I have owned all three, and even thought ergo's are not as good as the other two I went back to and am staying with the Glock
Here is why:
M&P has the worst take down!! I hate the tool in handle.
XD was not accurate, at least my XD 45 tactical, in fact my Glock 30 outshoots it by a lot.
I do not like the grip safety on the XD, others feel the opposite, but I just like the simplicity of the Glock.
XD slide rides on plastic!! Im sure it has been tested, but just something that I did not like. I am talking about in the rear of the frame.
The Glock is easy to get, buy, and replace parts on. Mags are abundant ( M&P mags were scarce at one point ) and the GLock is simple and rugged!!
In all fairness the M&P was very accurate, but the trigger was very gritty through 2k rounds.
I now own a glock 22 (2nd generation IMO best grip design) a 26 & 30. I plan on getting a 27 to go with the 22. For me the Glock is the best choice of the three. I am not a fan boy, in fact I still favor my 1911 and Beretta M9. But if the poop every hit the fan, give me the Glocks