How do modern historians view Chiang's decision to commit everything to Shanghai? In retrospect it was a mistake but given when Chiang knew at the time, it seems reasonable.
I am not an expert in the Sino-Japanese War, but from my perspective, Chiang Kai-Shek had two options in fighting Japan. One was a scorched Earth policy of endless retreat and resistance. The second was to score a decisive battle against Japan that would halt their invasion. The Soviet Union faced a similar threat in 1941 when Germany invaded. Stalin ordered every Soviet soldier to fight to the death--and they did. The USSR took huge losses, such as 700,000 (43 divisions) killed or capture at the Battle of Kiev, but delayed the German advance from taking Moscow before winter. The few Soviet units that were allowed to retreat were ordered to burn everything.
China didn't have the advantage of a hard winter to slow down its invaders. If Chiang was going to continually retreat, then it would mean giving up the major popular and industrial centers of the Yangtze river delta. If you're going to set up a decisive battle, what better place to do it than Shanghai where you can count on a large, friendly population to keep your troops resupplied and aid in the house-to-house fighting? Granted, it's by the sea so vulnerable to Japanese naval attack. Shanghai and all the surrounding cities including the capital of Nanjing were worth fighting for. What's the point in having an army if all you do is retreat?