both are comparable quality. the xd is a little cheaper, the gen 4 glocks have the swappable backstraps. the glock has the slightly better ammo capacity, springfield has better ergos, glock as better sights, xd has a supported chamber (less likely to KaBOOM), both have fairly comparable triggers.
I am a die hard springer fan but personally, I am partial to the XDM series, they have the replaceable backstraps, better triggers, and higher capacity. well worth the price difference in my opinion. I've owned an XDS9 4" a XD45 service, XDM45 4.5, XDM9 4.5, and XDM45 3.8 compact and handled several rental XDs, XDMs, and XDS. I've also had quite a bit of trigger time behind glocks, mostly service models but also a couple comp models and compacts. on average I tend to shoot glocks better, but I enjoy shooting springfields more and have never liked a glock enough to add one to my own collection. also, just to cherry pick my preference a little more, the XDM45 compact was the most accurate handgun in my collect for several years until I purchased a competition 1911.