When you check-in in PVG make sure your bag is tagged through to AMS. When you land in EWR you can either drop your bag off at the transfer-desk and have CO hold it or you can just take your bag with you as if EWR is your final destination. Now when you come back to EWR, you will have to explain to the check-in agent that your bag is already tagged and you just need to to be placed back on the belt to be deliered to your flight.