With ten days, Beijing, Xi'an, and Shanghai are a coherent first route. The key is to use high-speed rail where it saves friction and to protect at least one unplanned half-day in every city.
Use the middle city to change the pace
Xi'an should not be only a Terracotta Warriors stop. Give its walls, Muslim Quarter, and evening streets enough time to reset the journey between two megacities.
Do not turn rail days into attraction days
A train day can hold a neighbourhood dinner or a short walk, but not a full museum programme. Planning honestly here prevents accumulated fatigue.