If those are your only options, I would go with the flight out of SHA, 6+ hours is too long for me to sit around after a long flight. Bus or taxi are pretty cheap to make the transfer to Hongqiao, though fighting your way across town will be no fun.
There should be an earlier flight out of PVG. There used to be an early afternoon flight on China Southern, might want to look into that.
Also, if your inbound flight isn't booked yet, you should be able to get a tighter connection through PEK which won't involve airport hopping.
Safe Travels