Rust / tarnish / corrosion is a chemical reaction between metal atoms at the surface and oxygen atoms present in dry air, humidity, or liquid water. Generally chemical reactions are not affected by magnetic fields in any fundamental way, so what happens to the magnet in a harsh environment depends on the material it’s made of—not its magnetization per se.
Your shower curtain magnets might well be of the newer rare earth neodmium type (smaller yet stronger than earlier alnico or iron—surface fields approaching one tesla). Quoting K&J Magnetics:
Neodymium magnets are a composition of mostly Neodymium, Iron and Boron. If left exposed to the elements, the iron in the magnet will rust. To protect the magnet from corrosion and to strengthen the brittle magnet material, it is usually preferable for the magnet to be coated. There are a variety of options for coatings, but nickel is the most common…
I’ve seen nickel-plated neodymium magnets: they have a silvery sheen and are probably fine in the shower. But if your magnets have a flat black finish, they might be uncoated—just paint them & check contact points periodically for corrosion. Better yet, find some kind of thin elastic coating that goes on as a liquid then turns rubbery & waterproof. Hope that helps.