I have a HK USP compact in .40 and an XD 5" in .45.
The USPc I use for carry on a semi-regular basis. I usually use it at night because it has night sight. My only complaint about the USP is that it is pretty thick. Here in Florida it can be a challenge to conceal something like that. If that's not an issue for you, then do yourself a favor and consider it for purchase. I've put somewhere between 1500 and 2000 rounds through it, and have NEVER had a Failure to feed or Failure to eject. Then again, I clean it obsessively after every range session. IMO, this gun is the standard for reliability among autos. As far as aiming goes, it's pretty damn good. I can shoot a little bit better with my XD, but then again the XD has a 5" barrel versus the USPc's 3.6" barrel. As someone said before, the mags are pricy, but you get what you pay for. I also like the fact that I can carry the USPc cocked and locked. The safety/decocker is frame mounted and very easy to manipulate, even for someone with not-so-large hands.
As for the XD, it is a highly reliable well-performing gun at a more affordable price. I have put around 1000 rounds through it and never had failure to feed. I had one failure to eject, but 1/1000 is something I can live with. Also, if you are looking to mount something on the accesory rail, it is much easier with the XD, as it has a picatinny rail, whereas the USP has a proprietary one. I had to get a special rail adaptor for the HK in order to mount a laser to it. The XD is thinner, which is good for concealed carry. Mine has a mag capacity of 13, but I believe the subcompact has 10 rds. Only complaint about the XD is that I found the mag release is a bit stiff and more difficult to operate at a moment's notice.
Bottom line: I would stake my life on either of these guns, but as a matter of personal preference I would go for the USP compact.