Any of the Big 3 of Poly (Glock, Smith and Springfield) will serve you well for a long time so you have the luxury of being able to choose a quality piece based solely on how you like the way it looks and feels.
M&P for me, btw. I own 2 and they are good company to my 5 Glocks.
M&P. I've owned a couple Glocks but have limited experience with Xd's. My M&P 40c is my go to EDC. After the Apex DCAEK and RAM upgrades (~$100), I actually like shooting it better than my Sig Sauer P229R too. If you get an M&P, I know two things, you'll have a gorgeous gun and you won't be disappointed.
True you can fix it, but I can buy an XDm with a great trigger to begin with! I will admit that the M&P is a little better looking, I am not buying it for it's looks!!!
at one time I owned Both and it was a close race but the M&P won due to grip feel, shootabilty and accuracy (in my hands) Now that being said a buddy of mine who owns an M&P shot the XD and shot it better and ended up buying it.
The backstraps for the M&P and the contour of the grip was the winner.
I voted XDm. I love mine. To be fair I haven't shot the M&P but I held a few before buying.
I was previously a Glock guy and still am really, but the XDm has been flawless. I love shooting it, and can shoot it well. I thought the grip safety would be a pain, but I adapted to it quickly and really you don't have to change any of your style or grip. I love the gear as well as the 19+1 capacity for the 9mm version too...
I am a big fan of both. I went with the XD over the XDm though because the XD line has a 45 compact. I am sure that in the near future I will own a M&P though. Just buy both, problem solved