Government officials are struggling to ease Shanghai’s growing pains, which are only going to get worse.