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 :)
books I think are hardier. I was thinking this would be nice if they would put it in a covered public space. Our library managed one at the train station which was across the street from it. It was a bookshelf in the station itself so was protected from the elements. It was a take/leave with an option to never return something a little donate if you will tin. It was basically what they did with old books or donated books they could not add to the collection. Some old were in good condition as they would buy many copies of popular books and when it waned pair down to a few or just one copy depending.