Both. Both are really good and solid consoles that made alot of people happy and gave alot of people good childhood memories.
Though the problem with the Mega Drive is that alot of good games are there, though they are hidden gems, that didn't get noticed for some reason.
Everybody knows Sonic, Streets of Rage, Zelda, Mario, Final Fantasy, Starfox, Megaman etc
But not everybody knows some forgotten Mega Drive gems like Strider, Rocket Knight Adventures, Gunstar Heroes, Wonder Boy In Monster World, and Wiz and Liz.
So I find the opinion that the SNES has a better library of games a bit of a lie, they have a better well-known and popular library, but when it comes to their library of games, they are both pretty good and solid.
I think your favorite one is whatever one you grew up with, or whatever console just happened to have the collection of games that you preferred the most.
The Mega Drive does have a lot of strange and odd titles though, that might of put people off from trying newer and unique titles, hence why so many games got pushed underneath the rugs.