Not sure about VHS tapes (I dont think there are any here anyway) but discs will be fine the data is physical ridges in the plastic so unless it melts or bends you can read it.
CDs are apparently some of the most resilient storage media commonly found today.
DVDs (and presumably BluRays) less so due to the higher data density.
Rewritable less again, as those use a metal alloy for the bumps and ridges.
The thick plastic player with the ridges is pretty resilient, but above that is a reflective layer for the laser, and a protective lacquer layer (often printed on). If those layers get damaged and delaminate due to harsh handling, UV / heat, and / or moisture getting between them then the laser will have difficulties focusing and thus reading a disc.
Should still last years in such an exposed public free library setting where long-term preservation is probably not a goal, and get way more use out of them than sitting in personal closets where they'd last longer.
These are all over the Alps, but with books. Some of the books get a little faded when it's really hot but that's only if they're really boring books that nobody wants :)
For those who are already free of physical media: leaving them in a small enclosure like this in the sun will probably destroy them in the summer. DVDs and Blurays dont take lightly to extreme heat afaik.