Update:
I've reproduced the entirety of the speed system
here. Fool around with it if you'd like. I explain the mechanics in-depth on the rule slide too, but a lot of the finer details are below.
First, the order of operations in a frame is as follows...
1. increment timer
2. check if speed = 0, otherwise add to subdist($42)
3. Check upper 3 bits of speed ($40), and with frame counter...
4. Check to see if distance($3A) >0x60, if so mark as finished
5. And frame counter ($01) with table (0,2,6,E) using current gear as index
6A. If result is 0, jump to gear shift [6]
6B. If result is !0, add 1 to bar if not in clutch, otherwise add 3
6C. If result is !0 and you aren't pressing button, same as 5B except subtract
7. Check if gear shifted
8A. If no gear shift, check if in redline. If in redline, rotate carry into tach
8B. Rotate tech left for each gear past 1. Compare with speed
8C. If equal, skip speed increment (go to 9)
8D. If unequal and limit is larger, increment speed by 2
8E. If unequal and limit is smaller, decrement speed
9. Check if $D6 bit 2 is set, if so increment gear unless >4
10. Check if in steering mode...
11. Update Inputs.
12. Repeat
Based on that, there are a few bits of strategy to maximizing distance:
-Shift as late as possible. Every additional frame later nets you +2 total distance
-For 1->2 and 2->3, you can have the speed limit odd. You can abuse this to have the speed temporarily exceed the limit before locking in the speed with a shift. Hitting gear 2 at 32 speed and gear 3 at 64 speed seems to be optimal.
-As your gear goes up, there's a growing frame rule that checks your button state. At gear 4, it only checks the gas every 16 frames. Changing the frame counter to one of 8 configurations will net you different overall shifting points in gear 3 and 4, and tend to give fairly different performance.
-The "end game" is probably the most tricky, where there are some instances that allowing the tach to decrease or shifting early will get you very good results. I haven't figured out the exact rules for making an optimal choice, but sometimes it can lead to vastly improved finishes.
So all that said, I don't think better than 5.57 is possible. The best I've managed is 5.57 with 66 additional subdistance. There's just too much to overcome to get the extra bit more.
I've also confirmed in the code that it completely wipes the memory inbetween resets, so there shouldn't be anything possible from trying to get the memory in a funky state before going over. I also compared the original ROM with the PAL and one other version; the differences, when present, are just related to display controls.
So all that said, I can't think of any other way that getting below 5.57 is possible. The "simulated" best of 5.54 supposedly from the developers I also think is from a flawed implementation. There just isn't enough input options or otherwise to trigger a bug and allow starting earlier outside of glitching (as in, the actual hardware variety). Even assuming some level of cheating, I've managed a 5.51 only with starting in 1st gear with no shift and starting with 2 speed already stored.
I don't have any more ideas on this, and my interest is waning. I might think a bit more on the optimal finish timing, but for now I'm going to call this closed.