Ok, I have time now for a more thorough reply. I just want to remind everyone that the question is not "N64 vs. Wii U, which is better?" The question is "which transition did Nintendo handle better 2D -> 3D or SD -> HD?" If you actually look at this question with the benefit of hindsight, the answer is unquestionably SD -> HD. They actually handled this transition better than any other company. However, when going from 2D -> 3D they were in the bottom half of major companies (although Sega was definitely even worse). And yes, I am talking about software quality, both from my own personal taste and how their software was received by gamers in general.
2D -> 3D Transition
One reason why Nintendo handled this transition so poorly was that they were the king of 2D software. Here were the major 2D software makers that transitioned to the 3D era: Nintendo, Sega, Konami, Capcom, Enix, Squaresoft, and Rareware (maybe a couple of others I'm forgetting). The PC/home computer as a platform was also significant going from 2D -> 3D. Out of these companies, which made the best 2D games? Nintendo, unquestionably. Not only were they my favorite software developer at this time, but they dominated the marketplace, and when I was conducting my "Greatest Games of All Time" series of threads, people voted for Nintendo games as the best of almost every year during the 8-Bit and 16-Bit era. Nintendo was the king of 2D software.
The PC is interesting during this time period, because the PC was always ahead of consoles in terms of graphics (by a very noticeable amount), and yet PC software was completely overshadowed by consoles. Consoles just made better action games than PCs did, and Nintendo was the absolute king of console software. Then PCs made a major transition to 3D software in the early 90's. This really started with Myst. Since 3D gaming can create these huge immersive worlds, non-action games like Adventure games and RPGs greatly benefit from going 3D. FPS games also became significant since this genre was created from the ground up for 3D.
On the console side Sony enters the fray, with their major software being Gran Turismo, a racing game. Racing games also greatly benefit from transitioning to 3D. Final Fantasy (a non-action RPG) greatly benefits from 3D. Rockstar goes from being this little known studio to a huge overnight success because they transitioned from 2D to 3D, showing that open-world action games are hugely popular in 3D. Blizzard, ironically, becomes a major studio during this time period by focusing on 2D games like Warcraft, Starcraft, and most importantly, Diablo. During the 8/16-bit eras PCs could not compete at all with console action games, but when consoles go 3D, millions head to the PC to play Diablo, a 2D action game. This is because action games are not as fun in 3D outside of a few genres (like FPS, Racing, open world). Precise controls, timing, reflexes, twitchiness, etc... tend to be more important in most 2D action games and that is harder to replicate in a 3D action game.
This brings us to Nintendo and Sega, the two best developers of 2D action games. Sega really crashes and burns transitioning to 3D. If you look at the list of "must play Saturn games" the top one is usually Nights into Dreams which is a 2D game. Another big one is Panzer Dragoon Saga, which is an RPG (a non-action game). Most of the skills Sega developers had in 2D game development did not transfer to 3D game development, especially with action games. All of this can also be said about Nintendo, since Nintendo and Sega were very similar companies. Nintendo had to develop all new skills to develop 3D action games, and this basically leveled the playing field between them and other developers. Leveling the playing field was a bad move for Nintendo, because they were #1 for 2D game development. They went from king to just another developer. Platforming went from the #1 genre in the 2D era to a low to mid tier genre in the 3D era. Outside of 3D Mario, what 3D platformers are popular? Like none. (Maybe Astrobot which just released, lol.) Outside of 2D Mario, what 2D platformers are popular? Sonic, DKC, Castlevania, Contra, Mega Man, Cuphead, etc.... Platforming is inherently more fun in 2D. Most action games are inherently more fun in 2D.
I personally do not like most 3D Nintendo games. However, even for people who do like these games, you have to realize that Nintendo was clearly #1 for 2D software development, while in the 3D era most people preferred some other developer over Nintendo: Squaresoft, Rockstar, id Software, etc....
SD -> HD Transition
IMO, Nintendo handled this transition better than any other major developer. This is because they developed a very different strategy during this transition. They delayed. All other major companies transitioned as fast as they could, and this was the wrong move, because the transition from SD to HD is about development times slowing down.
A key part of this transition is the Wii. While everyone else was getting their footing going to HD, Nintendo just output a ton of SD games on the Wii and seemingly beat the entire gaming industry single-handedly. This allowed them to stockpile cash. At the same time other software companies release schedules slowed down a ton, because that is what happens going to HD. Nintendo had to take this hit too with the Wii U, but it was a hit that every other major company also took. They were smart in that they took it at a different time. Then they could use all of this surplus cash in HD software development.
There are several reasons why the Wii U failed, but it should be fairly clear that software quality is not one of them. (Quantity? yes. Quality? no.) BotW is far better than any previous 3D Zelda. 3D World is probably my favorite 3D Mario. I personally liked both Hyrule Warriors and Mario Maker a lot. I was critical of Mario Kart 8 at first, but now it has so much content that I'd have to say its the best Mario Kart so far. There are other games I haven't played yet, but they are their most successful version is their first HD version like Fire Emblem, Luigi's Mansion, and Animal Crossing.
Part of the SD -> HD transition is in making their handheld franchises now available in HD on the Switch. Combining their two platforms into one might be the smartest thing Nintendo has ever done. So even their franchises which were normally handheld like Pokemon and Animal Crossing are now available in HD like a home console. And they are sitting on so much cash from the Wii years (and now the Switch years too), that they can just keep expanding software development at a rate they are comfortable with.
Basically when transitioning from SD -> HD, Nintendo did better than any other company. They output lots of really popular software now, and no other company has nearly as many high quality franchises (not even close). Basically, they have the same status in the game industry that they had when they were the #1 2D software company. They lost this status transitioning to 3D, because other software developers were seen as equal or better than Nintendo during this time period, but now in the HD era, Nintendo is the king of gaming software again.