You could certainly do it with a Pi, but an Arduino would also work and maybe smaller and easier. Need something with 3 PWM channels. Way I see it working is that the throttle from the receiver goes to your adruino as well as the output from 3rd channel on your receiver to be the gear changer. The adruino would control the "gears", so say you're in 1st gear and you pull full throttle on the radio, the adruino would output say 20% throttle to the ESC until you hit the 3rd channel up on your radio, which would cause an up shift, then would output say something like 40%.
But honestly you probably won't notice anything other than an artificial speed limiter when pulling full throttle.