I live in Florida and keep my (carbon frame) bike in my garage, which would be similar to keeping it in a shed, and don't have any rust or corrosion issues. The frame won't rust, of course, but neither do the metal parts on the bike. I'm inland from the coast, but as others have said, salt air will quickly rust and corrode metal parts. You said you are considering getting an expensive (for you) bike. If you're worried about rust, consider a carbon frame.