Very good comments from AWorthyOpponent; here's my addition.
I was in your situation four years ago. I had just finished college and was looking for the best general purpose, all around gun. I had also narrowed down the choice to a G19 or an XD9SC, which at the time had even less of a history. I sometimes mod to my things (cars, computers, guns), but I don't always; however aftermarket support is a good thing to have.
In my opinion the Glock and XD had already met the reliability requirements, so the real question was regarding features, price, and accessories/parts. XDs used to be much cheaper relative to Glock, so that was a plus for the XD. I prefer the grip angle on the XD to the Glock, but I can work with either (I had very little 1911 experience, so there was no bias there). I prefer non finger grooved grips, so the later generation glocks were out for me.
Two lesser mentioned options on the XD that are not available on the Glock are the loaded chamber indicator and firing pin indicator. Most will say that these cannot replace a press check for a loaded round and I totally agree. However, it's nice to be able to pick up the pistol and look/feel the condition. My XD is always loaded with one in the chamber so the features are really redundant, but I really like being able to at least verify the condition on pistols without safeties (which most of mine are).
A few other notes from an XD user:
The XD Subcompact is great for an all around pistol because you can add the grip extender to get 16+1 rounds with a Service size grip. The only thing you lose is the longer barrel, and the option to change barrels (I believe there are still not any replacement caliber barrels for the SC). If you move to the Service size XD you have many more options including using one gun for multiple calibers 9mm/40/357 Sig (if that matters to you)
Here's a great picture for your decision; The XD Service and G17 are very close in size, as are the XD9SC and G19.
One final comment is that if you really enjoy shooting as most of us do here, you will end up with multiple firearms for many different reasons. I chose to leave my XD9SC completely stock, and I'm glad I did because I found better pistols for other purposes (Best Pointing Pistol: HK P7, Best Carry: Keltec P380 (pictured), Best Range Plinker: Ruger Mark I, etc.). Another interesting point to note is that when I got into shooting 9mm was ~$3.50 for a box of 9mm blazer, now it's $12. Needless to say I shoot a lot less 9mm than I used to.
-hype