Well, firstly, to compare 3D marios with 2D marios when they are two entirely different experiences is a big mistake.
New 2D mario are faster, with a deeper gameplay focused on mastering the timing of each scenario and with a great multiplayer experience.
3D mario focuse on different experiences, less jumping and more exploration, playing with concepts only possible in 3D (liquid physics on Sunshine, local planetary gravity in the Galaxys, etc.). Even 3DLand, which is a 3D-2D mario mix, has its own unique feel that makes it completely different than any other mario.
So at the end, saying that one formula is better than another one is just a matter of tastes, because in terms of quality, all those games are the BEST of their respective sub-genre.