The future of humanity is not only on earth. Too much risk, too limited resources.
HOWEVER the future of humanity in space is NOT "tomorrow we lift off a giant spaceship with everyone on it." If we survive a few hundred years we might see some amount of human civilization outside of earth, but for many hundreds of years after more practical space tech comes about most of humanity will still be born, live, and die on earth.
Maybe in a thousand years we'll see more humans outside of earth than on earth. But that's a long long long ways from now. If we are to become an "immortal" race (doesn't go extinct) then I can see the human race abandoning earth in a hundred thousand years or so due to many possible conditions. But even if we can colonize and terraform other planets, why would we want to when we already have a perfectly terraformed planet we're already on. Life has survived on earth farily well for billions of years, there's no reason why if we don't completely obliterate the climate we can't survive here till the sun blows up.