Retaking a test, that is conducted for HS admission purposes, just smacks of desperation and prestige-seeking.
You’re overall scores in both your testing and your grades just aren’t at the caliber expected at those prestigious schools. I agree that those aren’t the best CS schools. You didn’t pick according to subject, you picked according to the name of the school.
Your EC’s will not make up for your stats.
Also, how can you be a legacy of either school if NEITHER of your parents attended and have a history of activities or donations?
Do you have siblings at H or MIT?