FWIW my very expensive 2017 iMac has the same behavior. CPU pegged 24/7 by "mds" and "mdworker_shared". Just opening Activity Manager right now, I see about 20 mdworker_shared processes, each claiming ~11% CPU. I think disabling Spotlight get this under control, but then again, I like and use Spotlight. Surely Apple is capable of writing software that doesn't need to run full blast constantly.
Yea, trust me, it's annoying. I have no idea why it's happening, and web searches and stack overflow have not been particularly helpful. I have resigned myself to just living with a warmer room and having my mac's fans running constantly. This problem has been going on for years, and it's obviously not on Apple's Radar (pun intended).
Lol! If you live near a store, take it in. I’ve had lots of good experiences with Apple stores and soft/hardware issues. The ‘geniuses’ can be a a bit full of themselves, but all in all outcomes are good.