Legion definitely got off to a rocky start, but by the midway point Blizz managed to turn it around and made it into a pretty bloody good expansion - provided you didn’t get suckered into the silly Maw grind.
That said, it is true a lot of BFAs failings can be tracked back to Legion.
Awful class balance? Because Legion gutted class designs in favour of the game’s first ever borrowed power system in artifact weapons and legendaries which, AP grind and drop rates aside, were well thought out and completed the class kits. BFA maintained the gutted designs, but offered boring passive borrowed power effects that were mostly just stat boosts.
Flawed end game questing? Legion had a host of different world quest activities, some based on leveling quests, others being completely new and varied content, offering good, varied content on a zone by zone basis, then introduced Legion invasions that were capped off with a 3 man scenario. BFAs world quests all followed the same base formula, with only a couple that stood out, and the invasions ended with just another solo world quest.
Legion dungeons were varied and mostly well designed, barring a few cases of broken scaling, hence why M+ worked so well (not to mention the novelty of being new). BFA dungeons almost all follow the same format of throwing large groups of trash at you between each boss, ultimately favouring any class that can aoe well.
Legion had a fairly solid story, with a few rough spots here and there, with the biggest rough spot being Illidan. BFA had an ok story but with a LOT of rough spots all over the place, and replaced Illidan with Nathanos and made the player be Maiev. For the whole expansion.
Half of the expansion is an attempt to copy Legion, except poorly executed. The other half is an attempt at bringing in new features like islands and warfronts… except poorly executed. Especially the bit where they decided tier sets were a bad idea and subsequently removed all incentive in clearing the raid more than once…