Most FTers would agree that if you are traveling on 2 separate tickets, you want to be in the city of your international departure a day before your flight.
If you have two itineraries (CUN-MIA-JFK and JFK-PVG), if you are late because of your first itinerary, you will have to buy another ticket to PVG (which won't be until the next day). 2 hours is already cutting it close, as even a 30 minute delay can cause you to miss the check-in cutoff.
I would get a Friday flight out of CUN, stay the night in NYC, and be worry-free for your Saturday flight to PVG.