There are a ton of things you can do.
First: Clean it, oil it. Nylon brush and CLP will remove the surface rust. As long as there is no pitting you should be all set. I usually keep one "oily rag" that I wipe down my pistol with when I'm done cleaning it.
Second: Pickup some desiccant packs for your safe. Or some other kind of moisture absorber. You can find them all over the place. I guarantee that if you find a store that sells gun safes, they will have some overpriced product to sell you. I'm in IT and every piece of electronic equipment has some kind of desiccant pack in it. I save them all for my use. There's also a method you can make your own with silica gel kitty litter.(google it...)
Third: Store the pistol in a gun sock. Or a regular sock that is lightly oiled. It will help protect your metal parts.
Fourth: I'm not fond of the foam material that is in the XD pistol cases. It's a soft light grey foam and it will soak up moisture over time. I believe that storing your pistol in that type of foam can lead to rust.
Few people have been fighting longer than the Croats, so I bet they know a thing or two about good pistols.