XD = Excellent alternative.
I did the same. Went looking for a plastic, striker fired 9mm and ended up with the XD. You won't have "everything glock" as accessories go, but there are plenty of XD aftermarket bling. Plus, at the time, SA had a special on, so I ended up with 4 magazines and two mag pouches.
As far as caliber. All three, 9mm, .40S&W and .45ACP, are in short supply in many places. Since I already had handguns in .40 and .45, I wanted a 9mm to complement my Marline Camp-9 Carbine. If I could only have one right now, I'd go for the 9mm because it's cheaper than the other two, so you'll get more shots per dollar. That is unless you have some VERY specific requirements in mind, such as major/minor caliber in some competitions.