I've owned several of both pistols...M&Ps and XD/XDMs...and my preference is for the M&P line.
The XD/XDM pistols are good guns...but they don't feel as good in my hand as does the M&P. I like using the small palm swell/grip adapter on M&P pistols, and the texture of the XDM pistols is a little more uncomfortable to me. The bore axis is higher on XD/XDM pistols, giving it a different, upward-twisting recoil impulse than the M&P (or it seems so to me.) That's a plus for the M&Ps.
SA's customer service is top notch, so they will take care of any issues, as will S&W. That's a tie, IMO.
The XDMs are usually more expensive than the M&Ps, at least in shops around here. So, that's a plus for the M&Ps.
The final consideration for me is, S&W is made in America and the XDMs have "Made in Croatia" in a couple of places on them. I prefer to buy American products when I can. So, that's a plus for the M&Ps.
Overall, my choice is the M&P line of pistols.