Personally, I think I might make it if it were all luxury, maybe Oriental Express might consider planning one such journey from Singapore through China to Europe. For now, the luxury train Eastern-Oriental Express runs from Singapore to Bangkok Thailand over 3 days and the nearest departure dates are 14 Sept 2017 (usd $4,262) or 24 Sept 2017 (usd $6,250).
Alternatively, you can get from Singapore to Bangkok via local trains that have at least 1 run a day. Travelling Gold Class on KTM ETS from Singapore to Bangkok will take 3 or 4 days and cost less than S$100, not including lodging and customs fees. Of course you will have to change trains and book overnight stays in a B&B on the way there. Or try and catch an overnight sleeper train (pic below). Firstly, you have to travel across the border from Singapore to JB Sentral by bus in order to catch a train to KL. The stations are KL to Penang to Padang Besar (border) to Bangkok.
From Bangkok you can take a train to Nong Khai station and onto Thanaleng Laos (1hr outside Vientiane Laos). This part of the journey will cost less than S$100, not including lodging and customs fees. Therafter, all land travel in Laos is by bus. You can travel to Luang Prabang by boat or bus for another S$50 or so, 10 to 12 hours. From Luang Prabang to Hanoi by bus for under S$100, not including lodging and customs fees.
From Hanoi to Shanghai, you have to stopover at Nanning. So its 12 hours from Hanoi to Nanning for under S$100 and another 12 hours from Nanning to Shanghai for under S$200, prices do not include lodging or customs fees. The alternate route is Hanoi to Lao Cai - Hekou (border checkpoint) to Shanghai.
$650 for transportation
$250 fees and taxes
$350 for lodging
$350 for food
Total cost $1600
Total journey time is 8 or 9 days at least
Compare that to a direct flight from Singapore to Shanghai on Singapore Airlines economy class. The journey will take 5 hrs 20 mins, no stopovers, one-way and cost S$1,306 including taxes.