My take is this:
In theory - foam is bad. It has the potential to hold moisture, deteriorate, etc. A person who might neglect a firearm could have their neglect compounded or intensified by foam.
However, in practice - I think it's fine. I have several arms inherited which were stored 30+ years when not being used in foam or fur or flannel lined cases. All of them are in excellent conditions. The men who put them away knew and cared enough to NOT throw the cases in a damp dark basement and forget about them. They were oiled up before being put away, and stored in the most climate controlled area possible (which was ususally a closet or a gun safe IN a closet. A person who intends to care for their firearm well, will not find foam or other liners to be a problem. To make doubly sure though, I am still using those same foam, fur or flannel lined cases, but I have thrown a packet of silica gel in with the guns.