Similarly, any asteroid impact of a size that the Earth has seen since life appeared would neither wipe out ALL of humanity nor leave the Earth in a shape as horrible as Mars is in right now.
Edit: we know this for sure, because even after the asteroid that wiped out the non-avian dinosaurs, human sized and larger animals survived and thrived through the impact and fallback, despite having no access to any kind of technology or preparation. If the cold-blooded crocodiles could do it, I'm not worried about our chances.
Solar flares do not count as earth-ending events, at worst they could destroy our current electric networks and kill and strand maybe millions, but they are not in any way civilization-ending, nevermind life-on-earth ending as far as I know.