Sonic's jump is quite a bit more offensive than Mario's. He can jump on top like Mario, but he can also attack from below, the side, he can
spindash up the walls of Casino Night zone, jump off the wall using his accelerated momentum to nail Robotnik at a weird angle, you can jump into Silver Sonic's frame, you can
jump in between Robotnik's hands and his protected head if you time it right. His core abilities are more directly combat focused then Mario.
Although it certainly doesn't help that Nintendo never forces you to use any of the mechanics they added over time anyway. The spin jump in Super Mario World is one of the most hilariously underutilized mechanics in video game history.
Ah, but now you're talking possible applications of an action, rather than the number of actions as your were before. As an example, you compared with other NES games where the characters would have Jump
and Shoot... but in many (most?) of these cases, such as Megaman the character can't jump on an enemy like Mario can, so it's not as simple as your original argument portrayed.
I will concede that I didn't really consider the spindash, which is definitely another action of its own... however, the example you gave of its use highlights what I'm talking about. In the Casino Night Zone boss fight, Robotnik could have simply moved across the screen from left to right as Sonic ran across a flat plane waiting for him to lower during his attack before hitting him. This is what many Mario boss fights feel like. However in this case they've made the level itself integral to the boss fight by placing Robotnik out of Sonic's natural reach and make either the slopes of the pinball flippers his means of reaching Robotnik. Despite Mario's limited moveset, designs like this are entirely possible, as are many other types of fights seen in Sonic such as...
- Spring Yard's shrinking floor space
- Labyrinth Zone's vertical chase
- Star Light Zone's see-saw bomb returning
- Mushroom Hill's infinite runner style
- Lave Reef's self damaging battle of attrition
.. amongst others. Sonic been able to attack the enemy from more angles isn't the reason the boss battles are better. They're better because some imagination was actually used in their design. Many of them make use of the core platforming mechanics in order to create the challenge.. and for a platform game, that would seem like a no-brainer, rather than simply throwing the player and an enemy into the gaming equivalent of a UFC cage. Hell, the original Donkey Kong game pretty much serves as an example of how a Mario boss fight could look. Like I said, it's really not an excuse.
Yeah this, plus Sonic can take many hits as long as you keep on recovering rings, so the bosses allow for some experimentation as mistakes are less punishing. Back to offensive abilities, Mario´s offensive moveset is greatly nerfed against bosses: fireballs deal little damage, Yoshi´s tongue attack doesn´t even work...So if you already have a limited number of offensive actions and then you even reduce their efectiveness you´re left with not many things to work with.
Again though, this is just a case of failing to think outside the box when designing the challenges. Mario also has means to survive hits, and ways of replenishing this can easily be worked into a boss fight. This would also allow boss fights to make use of the various powerups unique strengths too, as the first challenge in beating a boss could for example be a means of acquiring a fire flower to shoot at an otherwise unreachable target. If Mario bosses are designed to discourage any means of combat beyond jumping on the bosses head three times, then that's simply a fault of their design. Nothing about the types of games Mario games are, of the actions available to Mario are necessitating the type of bosses the games have.