There's no reason to give up if you are only at Level 7 and need only a few steps to reach HQ 8. Maybe you don't have enough Armory units to keep attacking and defend your base. And be attacked by players 2-3 levels above you is not a thing to worry about. Is how the game works.
This game uses a stupid matchmaking criteria based on strenght (sum of all your buildings) and number of medals (more higher your medals are, more stronger rivals you will find)... And if you are maxed out at level 7, drop medals if they are too high and this can help you to find more easy rivals. Medals are useless because you can't buy anything with medals.
And you didn't say about be in a squad, then join a squad and fill your SC with Level 10 troops and play wars for resources to pay your HQ upgrade and frags for Elite and Armory units -- if you can't win attacks in PvP -- is now the best option to survive in the game.
And if you are attacked by Level 10s, fill your SC with Level 10 troops and go to revenge. Forget to win the attacks, lose if you need and foccus only on getting all loot possible.
A short history about be crushed by Level 10s: a level 10 attacked my baby Rebel base HQ 7 recently. 100% defeat. I revenge and got all his CB (11k) and more than 500k in alloy and credits. He got pissed and attacked my base again (100% again) -- but what i lost was too less than I stolen, and I was able to revenge again: got more 10k CB and more 300 k alloy in credits. Of course he attacked me one more time, and I revenge again, and got more 10k CB. Because I didn't need more CB, I moved to another planet. I lost all my attacks, but upgraded my Sentinel 2 levels thanks to all his CB.
A Windows survivor training players and helping squads through the Galaxy!
Imperial Prestige in "BombSquad18" (training squad)
Rebel Prestige in "Solo's_Band" (war squad) / Rebel HQ 8 in "Ewok_revenge" (training squad)