You were misinformed on the penetration thing. Both 9mm and .40 will sail through half a dozen interior walls. Both will stop in a human if you choose JHP ammo, as you should. I wouldn't even consider it an issue. I would consider that 9mm is much easier to control in smallish, lightweight pistols like the ones you are looking at.
I have shot several XDs and previously owned and carrier a Kahr K9. I would choose the Kahr CW9 of the guns you mentioned. It's flatter and easier to carry, and has a smaller grip and lower bore axis than the XD, which makes it easier for me to control in rapid fire.
The XD is a good pistol, but I dislike the high bore axis and the useless grip safety.
Since you mentioned "safety" as a point in favor of the XD, I'll just mention that the Kahr's DA trigger is much more forgiving of marginal gunhandling than the XD's single-action design, which is cocked all the time. Either is perfectly safe, however, if you keep the booger hook off the bang switch until you are ready to ventilate something.
Both pistols have long trigger resets, which is not helpful in fast/accurate shooting.