Assuming you have to check-in, you should plan to arrive 2 hrs ahead at the airport. I don't know what the check-in cut-of time is for PVG, but you also have to account for a potential queue at check-in.
It takes about an hour to get to PVG from the bund, but that varies.
I always like to be conservative.