Most of this has been said already, but here's my two cents:
TT: should be constrained to 2 stages. The distances that were normal until 15-20 years ago are no longer viable due to the rise of trains, but average total distances have fallen too far in the past decade - a new balance needs to be struck. 5-10k opening TT + 50-60k later TT, 20-30k early TT + 35-45k later TT, or the latter distances reversed with a final-day TT all work. These distances are indicative and can be altered a bit depending on the amount of other rouleur-friendly challenges. The final TT should never be the final GC day, but also shouldn't be ahead of all the big mountain stages.
Early pacing: if the first stage isn't a prologue, it at least shouldn't be a freebie for the sprinters - at bare minimum, it should be something akin to the old Paris-Tours finale. There should be a GC-relevant road stage early, especially in the Tour, to limit crashes, with no more than two road stages preceding it. If the hardest MTF you can produce is a Montevergine or Orcières-type unipuerto stage, or if a MTF isn't possible at all, this should be a hard hilly stage, similar to or (preferably) a bit harder than Épernay in the 2019 Tour or Sheffield in the 2014 Tour, or even a mid-mountain stage like La Spezia in the 2015 Giro or Calpe in the 2019 Vuelta. If a MTF is possible, anything between a murito like Caminito del Rey in the 2015 Vuelta and a mid-length, mid-gradient MTF like the Etna finishes at the Giro is fine.
Sprint stages: should be spread sufficiently across the race, with a clear sprint opportunity in both the second and third week, but limited in number - 5 stages that a Quaranta type can win is too much. The total number of sprints can be a bit higher than that, but the sprinters need to earn those stages. This can be because early climbing gives the breakaway an opportunity to stay away/has the potential for splits to form, e.g. Iseo in the 2018 Giro for a stage that did go to the sprinters, Albi in the 2013 Tour for a reduced bunch sprint, and Monforte de Lemos in the 2021 Vuelta for a successful breakaway are good examples. This can also be through hills in the finale - anything from Champagnole in the 2020 Tour, through Revel in the 2010 Tour, to Cap d'Agde in the 2012 Tour works for this. A hybrid between these two like Lyon in the 2020 Tour is nice as well. Finally, an uphill finish or finish just after a hill that's right on the limit for the sprinters akin to Almaden in the 2018 Vuelta, Tropea in the 2011 Tour or Saint-Brieuc in the 2008 Tour is also a good option for variation. In addition, roads suitable for echelons should be used if possible. Above all, however, dangerous finales like Pontivy in the 2021 Tour should be avoided at all costs.
Climbing: currently much too MTF-centric, I think there should be no more than 1, maybe 2 MTFs in a GT, and at least one proper descent finish. I'm perfectly fine with having only a few hard high mountain stages, if the quality is good and they're supplemented by good hilly and mid-mountain stages. In terms of mountains, I'd advocate for something like the following:
- mid-sized MTF in week 1. Size partially dependent on how early in the race it is.
- Two queen stage-sized days. For the description of what constitutes a true queen stage, I can't really elaborate on Libertine's analysis upthread, so I won't. If possible (this is harder for the Vuelta), at least one of these stages should rely in part on long climbs at altitude, like Laghi di Cancano in the 2020 Giro or Galibier in the 2011 Tour. Also, at least one of these stages should be (well) over the 200k mark, preferably in the 220s. Neither stage should rely much on MTFs and each GT should have a Mortirolo-Aprica style finish at least every other year.
- Supplement these three stages with 1-2 easier mountain stages (amount dependent on difficulty). These can be an easier hard-easy combination stage with a slightly harder MTF like Ax-3-Domaines in the 2013 Tour, a proper descent finish like Verbania in the 2015 Giro or even Cercedilla in the 2015 Vuelta, short stages like Foix in the 2017 Tour or Formigal in the 2016 Vuelta, or classic MTFs. Finishes like Zoncolan and Angliru should be mostly avoided, especially if a harder stage relies on a climb like Mortirolo, as they allow for no tactics and produce smaller gaps each year.
- Then supplement this with hard, GC-oriented mid-mountain or hilly stages. Turin in the 2022 Giro, Castro de Herville in the 2021 Vuelta and Tortoreto Lido in the 2020 Giro are steps in the right direction, but I'd like something harder than that to feature at least every few years... something like this, for example...
Cobbles and sterrato/ribinou/whatever you want to call it: again, at least every other year. The ideal placement is anywhere after the first MTF that isn't the final GC day.
The breakaway: will have plenty of opportunities with the kind of potential sprint stage I described, especially if there are also L'Aquila 2010-style mid-mountain stages.
The final weekend: at least one GC-relevant day that isn't a TT, the queen stage, or a MTF-centric stage. The final day can be a parade if necessary, but the Giro in particular could experiment with hilly circuits on the final day, either probably not GC-relevant like the Verona worlds circuit, or some harder climbs like Scala Santa if Trieste were to return as the finish location. And surely the Tour is overdue for a tribute to that 1989 TT?
A route with this level of variety and difficulty, provided that it's properly paced - queen stages in different weeks, no hard stages being blocked by a harder stage - is the closest thing to perfection I can think of.