Yes, humanity will outlive earth.
Think about it. In seventy years we went from horse drawn carts to missions to the moon, and we probably have a few centuries to develop a means of interstellar space travel. I do not believe global warming or a nuclear war will destroy humankind. We may be shortsighted at times but when confronted with imminent catastrophes we always manage to pull ourselves together. Look at the hole in the ozone layer in the late 20th century.
The fact that the human race can pull itself together pushes back the day that planet earth will be incapable of supporting human life. We probably have another few centuries, maybe a thousand years before a super volcano erupts or an asteroid hits. If we’re lucky, we may have a couple thousand years. I think that’s more than enough time to develop a ramjet fusion engine, or something similar, that can take us to distant stars.
And finding planets that can support life won’t be a problem. There are billions of stars in the universe, many having several planets orbiting them. There is bound to be some planets that have the right conditions to support life. NASA and other space agencies are finding new planets every week. They have already found a few candidates that may be able to support life as we know it.
If we are truly incapable of finding other planets that can support life, we can always terraform planets. Some planets may be so close to what we need that only a little tweaking will to the trick.
Humans have their options open. I think they are perfectly capable of expanding throughout the galaxy, the universe, and maybe eventually other universes.
Both time and our own ingenuity are on our side.