You have identified the difference between practical and theoretical optimization. Theoretical optimization identifies only the end product in the presence of a "neutral but benign GM." Practical optimization is worried about the paths and the playability at all levels.
It is easy to state this goal, of course. In practice, this means rebuilding a character four or five (or seventeen) times to account for the discrepancies introduced during the creation process. It also means finding a way to experience the class at various choke points to be aware of the optimization level at each choke point.
Looking at the Theurge you gave in your example, it is immediately obvious that the opportunity cost of a 2 level multiclass is nominally intolerable for the "Thou shalt never lose caster levels" Tier 1 classes. Therefore, we can look for solutions which minimize this opportunity cost. Ur-priest, the various early-entry methods, race selection to maintain effective caster level, etc.
None of these tricks are difficult nor even non-obvious. However, this problem illustrates my Constrained Optimization paper nicely: a good character is about well stated requirements. It is a common failing of the theoretical optimizer that they do not sufficiently articulate their requirements such that the character is playable or fun.
Practically, there are many ways to mitigate "low-level" weakness in a character. They all start with a coherent level by level build of the character, the level goals, and the intended play style. By creating quantifiable requirements, it is possible to anticipate "low-level" weaknesses and therefore build around them.
The best way to do this, besides not taking the superficially optimal class that does not fulfill your requirements, is to offload common tasks onto class features/items that do not necessarily require a higher level to function. In the case of the theurge, careful spell selection will mitigate the one level dip into an arcane caster class due to various feats neatly. There exists sufficient variety in spells that the trade off of one divine caster level for arcane casting is easily balanced.
Will this create an 'optimal blaster?" It depends on your requirements.
By enchanting magic items with common healing spells, it then becomes less necessary for you to have a maximal number of healing/buffing slots available. By finding an attack method that is not tied to caster-level during these first few critical levels, the need for higher-level spell slots is reduced.
Therefore, the "optimal" strategy is to take a level of ur-priest and theurge from that. Barring that, precocious apprentice or earth spell will provide a much shorter entry into mystic theurge, making it a slightly less non-optimal choice to take. At the end of the day, this is an area that has been well researched with much literature. Searching the literature for your given set of requirements will show solutions that you can test against your requirements level by level.
Be prepared to spend significant amounts of time on practical optimization, especially in systems that do not lend themselves to trivial computational modelling.