Either would be great for self defense. Either will stop anyone, anywhere, anytime, with proper bullet placement.
BOTH are expensive to feed, as the ammo for 45 and 357 Sig are a bit pricy.
I love my XD45 Service. I'd love it more if I'd opted for the Compact version for CC. That said, I carry the XD9SC almost daily, and love it too. And I'd trust it any day for defense. The 3" subcompact is easier to conceal, and more comfortable to wear sitting, with the 3" barrel.
The 9mm is almost half as expensive to shoot a lot. And practice is what will improve bullet placement, and bullet placement is what will save your life, not caliber.
That said, either XD will tear ragged holes in paper at defense distances.