Don't worry about the visa just yet, work on the itinerary. You can always create a fantasy itinerary and bookings for the visa application, then cancel everything after getting the visa and do something different. Nobody checks actual movements in China against visa application itinerary.
I think too much time in Shanghai which doesn't have all that much to offer the visitor, keep Xi'an in the mix, too much time in Beijing. I'd add in the following which are naturals to your general route: Luoyang, Huashan. For now we'll avoid overnight trains though you might be pleasantly surprised. As follows (overnights in parentheses):
Fri 30th August LHR to Shanghai arrive 31st (Shanghai)
Sept 1 - Shanghai (Sh)
2 - daytrip by bullet train to Suzhou and Tongli water town. Get an early start and return to Shanghai early evening. (Sh)
3 - Shanghai city during day then evening flight MU 5527 SHA-LYA Luoyang arriving 21:00. This flight is now available cheap, RMB 590 all-in booked online yourself. (Luoyang, try for the Christian Hotel).
4 - Longmen Grottoes and White Horse Temple. Afternoon bullet train Luoyang Longmen to Xian North Station. Go for the G659 departing 16:04 arriving Xi'an 17:35 which will give you some evening time for dinner and getting to the night fountain show at the Big Goose Pavilion. G659 ticket 1st class seat RMB 280, 2nd class RMB 175. (Xi'an)
5 - Xi'an. Definitely has more than the Warriors (Xi'an)
6 - Daytrip to Mount Huashan, 30 minutes by bullet train from Xi'an. Get an early start and back to Xi'an in the evening. A lot of hiking/stair climbing but there are cable cars for part of it. 2nd class seat fine for this short journey, RMB 55 each way. (Xi'an)
7 - Xi'an part of day. Afternoon bullet train Xian North to Beijing West. The G666 is a decent option dep Xian North 16:03 arr BJ West 21:32. Or you could go somewhat earlier or slightly later. 1st class RMB 825, 2nd class RMB 516. This is one segment I wouldn't fly. But you might consider an overnight Z or T train which is quite decent in soft sleeper (RMB 416).
8 - Beijing
9 - Beijing
10 - Beijing
11 - Beijing
12 - Beijing
13 - Leave Beijing
One daytrip out of Beijing you could do is to Cuandixia which is a pretty well preserved Ming Village about 2.5 hours west of the central city, takes about 2/3 of a day. There is of course the Great Wall which with your time, you could devote a day and go to a less-touristed "wilder" part (though for safety I wouldn't go too wild unless with a small group, there are some you can join in). I wouldn't devote more than 5 full days to Beijing though.
If you decide to forego Xi'an on this trip, then I would amend the itinerary and do Shanghai, Suzhou, Hangzhou, water town, Huangshan and Yixian Villages, then up to Beijing which would be same time frame. Ground transport between cities except (night) flight Huangshan to Beijing.