Hard or soft the gun cases can cause rust due to the fact that they can retain moisture from condensation,due to temperature changes or just moisture trapped from the air or water that has been allowed to gain entry into the case.Same issue as if a plastic bag is used.
Also both will pull the oil off the metal in short order.The foam lined cases are extremely bad about this.The foam also holds moisture just like a sponge.
Same goes for safes if not properly maintained.
Storage is best done were the weapons will remain a certain temp,within a few degree's,at all times even in open air.Just a ten degree swing in temp will cause condensation.
Thats the reason you will see alot of hunters keep the weapons out in the cold rather than bring the weapons inside and out while in use.Mainly fogged scopes,but it basically the same issue.
Non-sealed cabinets work well because the inside temps can vary with the outside air.But then humidity of the room comes into play.
Open air storage such as gun racks also have the humidity issue along with the evaporation increase of the protective coating,and dust accumulation.
But being that we all pretty much have air conditioned homes the humidity is lessened considerably.So thats taken out of concern,particularly if a verygood oil is used like CLP etc..
So what I do is I use a safe and gun lockers.I have a large collection so it takes several and safes are expensive,bulky and very heavy...so I have several lockers I use for the Mil-surps etc..Expensive toys and handguns go in the fire and idiot proof,very expensive safe.
The safe,I use a golden rod to maintain a certain climate inside the safe without huge swings of temp,which causes condensation and traps it.
For the lockers I just make sure the weapons are oiled well and I keep the room at 70F year round.I also check the weapons quarterly.
If you want to store a gun in a case or bag I would look into the VCI type bags that are designed for such purpose.