As I understand it, the XD series pistols work about the same as Glocks and Sigs and basically everything else out there when it comes to full size mags and compact/subcompact models: as long as you have a grip of equal or greater length in the same caliber, it'll work. Like, if you have a Glock 26 (subcompact), it can use the Glock 19 (compact) and Glock 17/34 (full size) mags. Likewise, with the XD series, if you have a subcompact model, it can use the compact and full-size magazines just fine. It would be strongly recommended to use magazine adapters/grip spacers when using larger mags in the smaller-grip pistol, though, so you don't run the risk of jamming that thing in there when the slide's locked back and damaging your ejector or whatever else - the adapter acts sort of as a "stopper" and makes the mag bottom out, just as the magazine base plate does when using the original correct-sized mag. Y'know, like this:
Aside from that ... yeah, sounds like a solid plan. Using the same platform for duty and for off-duty is always a good idea, as it provides consistency in manual of arms as well as gear. Personally, I'd by carrying one or two full-size mags (with adapters installed) when carrying the compact or subcompact, and have those mags as dedicated units to your off-duty carry rather than switching the spare mags for your full-size duty piece back and forth between duty and off-duty.
As far as going with a compensated model ... ehhhhh. I'm kinda on the fence on that one. I don't buy all this nonsense some folks spout about "OMG YOU'LL GO BLIND WHEN YOU SHOOT AT NIGHT!!!" when it comes to ported barrels. I've fired .45 ACP, 9mm, and even .357 Magnum at some rather dimly-lit indoor ranges, and depending upon the ammo used, the effect upon the shooter from that flash ranges from completely non-existent to, at worst, a moment of "Oh, wow, that looked cool" followed immediately by "Oh, wow, my shot still landed where I wanted it to go." The whole blindness-by-muzzle-flash thing with ported/compensated barrels is grossly overstated, IMHO. The bigger issues are NOISE - let's face it, just about ANYTHING centerfire is going to leave your ears ringing (likely with permanent damage) in a defensive situation - and the possibility of directing that blast back towards yourself if you're firing it from a position close to your body and if you don't have the port(s) angled away from yourself adequately. Worst-case scenario, you get even more noise directed toward yourself as well as a bit of carbon and some flash - nothing like blowing off the tip of your thumb (a-la putting your thumb on the wrong spot of a cylinder with a .357 Magnum Chiappa Rhino

), but still not fun and potentially injurious.
As someone that carries a S&W Performance Center Shield in .45 ACP with a ported barrel, I can honestly say ... skip the compensated stuff. It's nice for the range and competition, but you're not likely to see/feel any benefit in a real defensive situation. I'm all in favor of going with whatever long-slide/-barrel version you can get of your duty carry gun of choice, however, because having a longer sight radius is always a good thing, as is the added velocity from a longer barrel. Just be aware that a longer barrel/slide, past a certain point, can be a bit more cumbersome to yank clear from your holster and get on-target. I'd say with a 5" model XDM for duty and a subcompact XD 2.0 for off-duty (both in whatever caliber you prefer), you'll be just fine.