Your situation is actually quite a bit simpler. Yes, you need to file Form 5329 and pay the 6% penalty. But you don’t have to withdraw the earnings. You can leave them in the IRA, permanently, without further penalty. They aren’t taxable income for 2020 or 2021. Once you incur the 6% penalty, you can correct the excess contribution without withdrawing the earnings.
Furthermore, depending on this year’s income, and this year’s contributions, you don’t necessarily even have to withdraw the $7,000. You can “correct” an excess contribution by keeping the current year’s contribution below your allowed contribution by that same amount. So, if you qualify to contribute $7,000 for 2021, but you contribute $0 for 2021, then you’ll be treated as having corrected your 2020 excess of $7,000. If either of those is untrue (either your income is again too high or you already contributed for 2021) then you have to withdraw the $7,000 by December 31 to avoid incurring another $420 penalty. But you don’t have to withdraw the earnings.