I feel like that post-Genesis Sonic games started going off into a bad direction. That led to fans making new Sonic games based on old ones that ended up being better than what SEGA was making, which in turn led to Sonic Mania. Mania is great, but it is great because it's a throwback that taps into the old games. It doesn't really do much of anything new or surprising gameplay-wise, outside of some stage gimmicks (my favorite of which is the chemicals in the chemical zone) and some cool bosses, especially THAT boss, lol. The game is successful because it revisited what made Sonic great back in the 1990s.
Nintendo, on the other hand, sent 2D Mario in a GOOD direction post-16 bit era, with New Super Mario Bros. Wii and U being some of the best in the series. They are new games, through and through, with new powers, abilities, surprises, and ideas that reach beyond simple stage gimmicks, and collectively, the NSMB series feels like a very worthy successor to the old 2D Mario games. The problem, however, is that all the games in the NSMB series are similar to one another gameplay-wise, graphically, and especially musically. So by the time we got to Mario U, we were mostly all burned out from the last three games with the exact same music and similar graphics and gameplay.
So basically I feel like that Nintendo needs to do the opposite of Sonic Mania. It doesn't need to reach into its past to fix the present, Nintendo needs to look to the future of 2D Mario instead of being stuck in the past and present.