When RAW are unclear, consider their impact on your fun
I believe that you should always attempt to understand the rules as written first. Looking at this section of TGtE, we find that...
There is an initial introductory paragraph under the section heading, and then two sections under subheadings. Textually / Structurally it would appear that the first paragraph contains the general rules, and then the two subheadings offer contrasting implementations. Thus, the design and layout of the rules imply that changing your subclass can occur only at level breaks when you gain a new subclass feature; that is a hard requirement for invoking this rule. Once the rule is in play, the GM then selects from two contrasting options for implementing it - will it cost resources ("Training time"; time, gold, a quest), or not ("Sudden change")?
Narratively, on the other hand, it might seem odd to say that a character can encounter "an entity or a place of overwhelming power, beauty, or terror" only at certain pre-determined level breaks. The three specific examples given of circumstances in which a GM might allow a "Sudden change" are all plot-driven, and there is certainly a disconnect with saying that such events matter only if they coincide with the steady progression in class ability measured by experience points. Here it appears that the circumstances around which a "Sudden change" is justified also argue for allowing the change at any level.
Finally, linguistically, immediate and sudden are similar words but have different meanings. "Immediate" is the opposite of a process that occurs over time. "Sudden" could be contrasting the time spent training, but "sudden" also has the connotation of unexpected or unplanned. If the subheading was called "Immediate change", it would clearly be contrasting only the "Training time", but still under the requirement of the change happening at certain predetermined levels. By describing the change as immediate but calling the process "Sudden change", the implication is that it could happen at any time.
Having exhausted our analysis of the rules themselves, we can conclude...that they are at least unclear if not contradictory. While I believe that one should make every effort to understand RAW first, when it is clear that multiple interpretations are possible, my next priority is assessing which interpretation best supports fun at my table.
The impact of permitting a subclass change at any point in time compared to one allowed at certain levels only largely depends on your play style. You may want to review "Know your players" (DMG 6). At one extreme would be if you had a table of "Optimizers", who "welcome any opportunity to demonstrate their characters' superiority." In this case, I would strongly recommend that you keep to a hard requirement of changing subclass only at subclass-defining level breaks, and that you impose the time and gold requirement of "Training time" as well (although not the quest). Anything less will invite these players to switch subclass solely for the mechanical advantages involved, and you will have things like them reasoning, "Now that I have magic item x or spell y, I get better synergy with subclass z, so I want to switch now." Granting a subclass change to one of them while disallowing it to another one is also likely to generate hard feelings.
On the other hand, if you have a table of "Storytellers", a change at any time is fine, as long as it connects to the character and plot arcs you are creating. Allowing the change to coincide with an important dramatic event can even reinforce the player's connection to their character concept. In this case, you are likely using "Story-based advancement" (DMG 261) anyway, so the events that justify their "Sudden change" are also likely to be level breaks as well - although you can safely ignore whether or not the new level comes with a subclass feature.
If your table is in between, or has a mix of different playstyles from different players, consider how imposing or relaxing the subclass feature level requirement will affect the fun of both the specific player involved, and the rest of the table.
Somewhat related: This question about a player who is not yet ready to make a subclass decision even though their character has leveled.