Play a really long MIDI piece (maybe 10 Minutes), with MIDI and audio going in parallel to Cubase.
You said the MIDI is earlier than the audio. Is it early by the same amount at the beginning of the long piece as at the end?
If that’s the case, you can just nudge the MIDI forward by a certain amount with every recording and you’re golden. Someone in another thread suggested making a macro so that when you hit “stop” recording, it nudges.
But if the “earliness” varies, then there are a multitude of other possible reasons for the problem. You could start with reading this http://www.soundonsound.com/sos/dec07/articles/cubasetech_1207.htm while waiting for someone else to come along and help out.
It gets kind of crazy. Some people have even suggested you have to exit from Cubase for a while because keeping it up and running for long periods of time makes it go out of sync. I’m not smart enough to figure it all out, but much of it sounds like primitives smearing symbols on cave walls to keep evil spirits away.
Good luck -