Not apples to apples but
I own a P99 in 9mm, and XD40 in .... well .40
I like the p99 in so many ways. I certainly shoot it better, but only have ~1000K thru the XD. I like the trigger A LOT more on the p99. Mines not mushy (XD is moreso, if at all). Glock triggers are mushy ...
P99 reset is shorter then XD. This makes it easier to shoot "at speed" (below .2 second splits). Better shape for carry (MUCH thinner). Full size mags used to be available for ~65 bucks but went up, but are now DOWN
Never had a problem with rust on the p99. I have had it start on the XD. (All day shoot, heavy dew after dark, by the time I had it home, it was "rusted" = very light surface rust. Not a big deal, I'll keep a cloths soaked in CLP in a baggie in my range bag from now on. But it's also something I'd be happier about not worrying about. By the time you treat your slide with any of the finishes that most recommend, the economic advantage of the XD goes away, maybe swings to the p99 depending on the deal you get (ie. Robar, hard chrome or whatever). If I planned on keeping mine, I'd get it treated.
Eventually, I plan on trading my XD towards a 610, so that I keep a .40 caliber shooter (I can get cheap/free .40 from a relative). That was the real reason for the purchase initially. But I'm starting to like the idea of a 10mm platform too. If not the 610, maybe a (Para) P-16 with a 10mm bbl.
YMMV, HTH, IMO, etc