Whats your experience level?
I have a XD40SC. I would not recommend it (in .40 S&W) as a first pistol. It's small with a fairly heavy recoil for it's size. Not a recipe for a happy novice. That said, it is accurate and reliable.
In 9 mm it's very likely much more manageable.
Of course, if you're an old hand with pistols, get whatever floats your boat.

I chose the .40 rather than the 9mm. My wife has a Glock 26 and I wanted a caliber with a little more knock down. It does have a bit more recoil than the 9 mm but as previously said it is an accurate weapon.

I'm new here. Hope I'm not too late. I carried an XD9SC for several years. I found it to be reliable, fairly accurate, but heavy for its size and a little chunky. Also low ammo capacity for 9mm, and the XD Gear extended mags were not good for me...too wobbly. If you get the XD-SC, be sure to get some Pearce mag bottoms--vastly enhance the grip with a place for your little finger to rest.

Later, I found the Glock G19 (or 23 if you prefer .40) to be an excellent concealed carry compromise that no one besides Glock offers. Sizewise, it is between the full size and the subcompacts, yet it is lighter than the XD9SC, and it holds 15 rds. The 4" barrel is just right--not too long, not too short, so you get greater muzzle velocity. Of course it lacks the XD/XDM grip safety, a concern for some people.

FWIW, I carry a full size Colt 1911 (8+1 .45ACP) in a Comp-Tac Infidel holster and also carry a Springfield XDM-45 for when I want to have lots of big bullets (13+1 .45ACP). Both are very reliable, but the Colt trigger is better than any XD or Glock.
Bill

The 9mm is the more versatile of the two. Loaded hot with 147 grain expanding bullets, it is an approximate equal to the .40 S&W. Yet, you can buy relatively inexpensive practice ammo in lighter FMJ loads and practice more cheaply. Also, the .40 S&W has a sharper muzzle-flip tendency, although that would be neglible to an experienced shooter.

Why not just go for the gusto and get an XD45 - gentle recoil for its size and much more fun to shoot.

With the right ammunition, there isn't alot of difference between the 9mm and the .40. Not the difference there was 10 years ago. I've was never a fan of the 147 gr. 9mm due to it's lack of expansion, but the Federal HST 147 gr. has shown phenomenal expansion, even from short barrels. Given the choice, I'd still opt for the .40, but I no longer feel underarmed with a 9mm that is loaded with HST's or Rangers. The 9mm does have the advantage of less recoil, which aids is follow up shots, and is cheaper to practice with.

Info taken from: Ballistics 9mm Stopping Power vs .40 S&W and .45 ACP ammo bullet expansion penetration
CCI Speer Ammo (Gov. Test) Bare Gelatin Expansion
9mm Gold Dot JHP 115gr 12.8" 0.67"
9mm Gold Dot JHP 124gr +P 13.40" 0.68"
9mm Gold Dot JHP 147gr 14.80" 0.57"
40 S&W Gold Dot JHP 165gr 13.05" 0.65"
45 ACP Gold Dot JHP 185gr 11.95" 0.68"
In my opinion, the ammunition that you select is more important than the caliber, if we are talking about 40 vs. 9mm. I like the nine because it costs less to shoot and has maybe a little less noise. Many will say that the 40 is better, but I doubt that the difference is really significant. There really isn't much difference between the 9mm and the 45 ACP when you compare Gold Dot or Federal HST. It often comes down to a 10th of an inch with equal penetration. Hope I didn't just start something!