The best beach within proximity of Shanghai may have to be the Jinshan City Beach. Although it can take over 2 hours with public transportation and there is actually a no swimming rule to keep the imported water clean, the beach is free and there have been numerous changes made to make the area more attractive and enjoyable. It is a popular beach for volleyball, kite-flying and more; there are also amusement park rides nearby and a fresh seafood market. If anything, it is a really interesting place to view Chinese beach culture firsthand; you'll see what we mean when you see the locals wading into the surf fully clothed!
Note:For the more adventurous, there are activities like 4-wheeling and bungee jumping available at the beach.