I have the xd-40sc and a glock 22. As far as reliability from a brand new gun, Glock> Xd. The glock 22 fed everything while the xd jammed more than often, about 10%. However, after the magazines of the xd was broken in, it didn't jam after that. It was a magazine issue that generally happens to the xd-40. It's not a big deal, just let the magazines sit with ammo in it for a while.
As far as the 9mm goes, they are essentially equal in reliability. I really like the way the xd feels in the hands compared to the glock. In my opinion, the subcompact glocks feel better than the full size glocks due to the reduced grip angle.
As for the 40mm, reliability should be equal after break in. The xd-40 has a better supported chamber, if not the best in polymer pistols. This helps prevents the chances of kaboom in out of specification ammo rounds. The chamber is also tighter which may explain why the glock is more reliable in feeding all types of ammo. Nothing to worry about if you choose the right ammo and proper break in.
The xd in 40 s&w shoots much better than the glock from the factory due to the tighter chamber. If you look at the 9mm, I think they equal.
You should shoot both at the range. I'm planning to get a glock subcompact in 40 s&w or 45 g.a.p. because it's more concealable than the xdsc due it its shorter grip.
The finish on the glock is much better than the xd. You can get the xd refinished with duracoat or guncoat with the price of the xd cheaper than a glock.