SA2 has its highs, but also some low lows. While I enjoyed most of the Sonic and Shadow speed stages, the stages with the other characters were not as fun, and the treasure hunting stages were downright boring and tedious. Some of the game mechanics were a bit dodgy too and created a few moments of frustration (eg rail switching). But overall it's a fun, memorable experience.
However, SMS has that next-level Nintendo quality and the platforming game mechanics are just smooth and work consistently. The stages were all very creative and had just the right level of challenge. I get that the water jetpack turned off a lot of people, but it was a fun little gimmick that sets it apart from the other 3D Mario games, and the water effects were pretty impressive, especially for its time. No doubt, as most others have pointed out, it's the overall better platformer.