Speed shoes are susceptible to what's essentially a stack overflow, where the stack size is limited to 1.
When you get a speed shoe, the game appears to take the old maximum running speed and stores it in the "stack address", so it can temporarily add a certain amount of speed to that value. When the effect ends in 15 seconds (or immediately, if you die or restart the level), the game restores the value from that address to be the character's new speed.
If you get a second speed shoe while the first one is still going, that's where the strange things happen. The game stores the old speed value, but in this case that happens to be the speed value after +1 Speed Shoe. When it ends, that value gets restored (the game doesn't move the pointer address or anything), and you get permanent +1 speed that persists across lives, and indeed everything except exiting the level. The old +0 speed value is entirely lost in the shuffle and never restored, because there's only room to hold one saved speed.
At least Sonic and Shadow have another way of invoking the speed storage routine, so they can get the effect even with only a single speed show to make use of. First cross a checkpoint for the shoes, then charge up a light attack. Light attack makes you
slower while it's held in reserve, and a speed value gets pushed for that too. It takes a couple seconds standing in place to charge a light attack (plus the diversion spent getting to the character upgrades, neither of which is in a place Sonic or Shadow will be visiting during speedruns of the levels they're available in), so this isn't something that saves any time in a single segment run, but it's good to know. Performing those actions in reverse order is also possible, and results in being permanently slowed down to latent-light-attack speed, which obviously isn't very useful either.
There's one other configuration worth noting: charge a light attack, then get into a scripted place where the game forces a somersault. Sonic will do a somersault, but since you're still holding B, it'll segue into another spindash charge, allowing you to charge a second light attack. This is another way to get the permanent slowdown without any checkpoints at all, and more notably it means Sonic will be surrounded by twice as many roving light attack spheres. You can keep this going and I don't think it causes the speed value to lower any further, but you do get more and more spheres. On Dreamcast, the HUD started flickering after about 40 sets of spheres, and disappeared altogether shortly afterward. At 72 sets, the game crashed, presumably from a memory overflow. I suspect the limits on GameCube might be higher, and there's a slim chance that by monitoring what the memory array is doing, we could get total control out of this, not that it would be interesting at all to watch the setup.
I don't play on an emulator and don't have access to memory watch for the game, so I wouldn't be able to put a precise number on how high these speed values really are, or how high they're capable of going after repeated speed shoe stacking. I do know that prior to recording
this video, I set up by popping balloons for speed shoes until I counted off a +12 bonus, even though the number of those that actually increased the speed could be less.