Formula One (F1), is by far the most popular auto racing series in the world. The term 'formula one' refers to a set of rules and standards that all competitors and cars in the field, must abide by. It started in its current format in 1950 and has watched the technology progress ever since. The cars have changed many times in F1's almost six decades of existence. So have the engines and the tracks. The rules have been changed and tweaked many times, as well.
With that in mind, coupled with the fact that F1 continues to get more and more popular around the world, with more nations than ever wanting to host an annual race, I don't see Formula One racing going away anytime soon. They have a proven, successfull track record of making changes, when changes need to be made. All they have to do to survive into the future is make another round of changes to come up to environmental standards.
If the technology of driving is moving towards hybrid, electric, hydrogen or whatever, Formula One can follow suit and remain the technology pushing proving ground that it's always been. If not all of the manufacturers currently involved in F1 don't also follow suit when the time comes, there are countless other ones who would. By why wouldn't they? If that's the way society is moving, manufacturers of anything must move that way too, or get left behind.
F1's engine makers are currently all European, with a couple of Japanese entries also in the mix. Perhaps losing one or two manufacturers from Europe who can't or won't convert, would open the door for an American manufacturer or two. Competition could really get hot if more nations had representation in the companies themselves and not just the drivers. These types of changes could be the dawn of the greatest era of F1 competition yet.
I see this scenario as being far more likely than Formula One simply fading away because of global warming trends. If people really love it, and I think the evidence speaks for itself, they'll find a way to keep it by bringing it up to speed with changing times. The only things that get left behind in times of change, are things we have no use for anymore, or things that simply can't change. I believe F1 will be at the forefront of such changes, and not permanently parked in the garage.