OK, I've used foam in a number of tanks for rock columns. The oldest ones that are still under water have been so for about 2 years, and are still going fine. I used the regular tan great stuff foam (large expansion, not the small expansion stuff) and I haven't seen any breakdown of the product under HO lighting. These are also painted in places with Krylon Fusion paint....all good so far.
NOW - if I do this again, I'll probably go with the black pond Great Stuff. Not for any degradation reasons, but purely aesthetic. When snails go over the foam and rasp off any algae, the painted foam naturally wears down and leaves a swath of bare, tan colored foam. Not a HUGE deal, as coralline and the like usually grows back over it, but still...... this probably wouldn't be so noticeable if I used Black foam.
Finally, just FYI - I know the snails are probably ingesting small bits of foam and/or paint. To date, no snail fatalities have been recorded in the tanks with the foam.