Assuming you're holding a Chinese visa (and not continue on a seperate ticket from Ningbo using 24hrs TWOV - theoretically, imho even 144hrs TWOV possible since it's within Zhejiang that allows 144hrs together with Shanghai and Jiangsu.. but I suppose on TWOV it wouldn't work time-wise) this connection is doable. Imho requires to recheck luggage, so it's a bit tight, but on time arrival will mean you can make it. Won't have time for anything else.
Worst case, you'll be put into a hotel in PVG for the night if there is some delay incoming (assuming that's the last flight out of Shanghai) or they might set up alternative transport (it's only 2.5-3hrs by car/bus) if there is a low of people missconnecting. Nothing to worry about.