3 things you need for a happy running engine
1 fuel (fuel line, fuel pump, carb)
2 compression (valves, cylinder seal piston rings etc, cam clearance)
3 spark (ignition timing, spark plug, leads, coil(s))
so we can work backwards from here, side note if you don't feel like reading the recent job I did on my zzr600 which has a similar engine to yours afaik
had a problem like you're describing under 5k it coughs and farts and is rough to start and then takes off above 5k it was a combination of crap spark plugs (replaced with new ones) the lead ends were dirty and the carb was full of water and other gunk.
the spark is easy just take each spark plug out one by one hold it in its lead and touch it against the top of the engine then turn her over, if you see a spark its fine spray a little wd40 in the lead end and plug her back in move on to the next one.
I doubt you have a spark timing problem because you haven't touched it (afaik
so move on to compression again fairly easy to do a rough trouble shoot on: put the bike in neutral make sure all your plugs are in take the stator cover off and try to hand crank the engine by putting a socket on the bolt that holds the stator. ONLY TURN IT CLOCKWISE DO NOT GO COUNTER CLOCKWISE OR YOU COULD THROW THE TIMING OFF AND CAUSE ALOT OF HEADACHE...if you cant turn it your compression is good...if you have good hearing you can also just disconnect the plug leads (remembering where they should go ofc) and turn it on the starter motor, if you have a good ear you can hear the cylinders "breathing" which would mean air is passing through the cylinders right.
which leaves us with fuel: I left this last because you have 2 choices really you could run like seafoam or some other fuel additive through the engine and hope it clears (luckily for me I just ran it a mile or so and whatever it was passed through the engine burned off and was no longer a problem) OR you have to strip the carb down and give it a good clean out. you said you have a compressor so the cleaning part should be easy and carb cleaner spray can only really do so much.
My money is on water or oil getting into your cylinders (hopefully through the carb the only other place is a really bad time for you) which will throw off the fuel mixture...and if the engine is carbonized inside your pistons start to get a glowing surface which causes preignition, you CAN take the head off look at the cylinders for residue of dirt or oil but personally i wouldn't recommend it because its a pain in general cover your easiest options first but that backfire tells me the first ignition stroke didn't ignite and got pushed out into your exhaust which would also cause the second ignition stroke to have more fuel and the bike suddenly jumps forward on that stroke.
sorry its really long but I wanted to cover everything I could think of that would be causing your issues, also these are VERY rough diagnostic methods but should give you a good idea where to look good luck