I agree that we should be able to save the earth. I think both are possible and also intertwined, because whatever our solution, it will likely require advanced capabilities to deploy technology into earth's orbit, be it large scale solar shielding, some atmosphere transformers, or whatever.
Still, repairing earth and creating space ships are two different things. We did not design earth, and the size of it makes it hard to control. It will be MUCH easier to sustain life in an underground lab (or space ship) than it is to repair earth. At least conceptually. But of course you have a point that we should not abandon most of the population for two reasons:
1. It's a bit cruel and probably only the worst of mankind will survive again, as it always did.
2. Project "Space" might turn out to be one hell of a disaster, since it's hard to predict how humans will fare in space. So we should have a backup plan.