From here, bacteria needs four things to grow. Also note this wiki article that I got a lot of links from to use below.
1. Correct temperature.
Note that in order to survive in extreme temperatures, the extremophile bacteria obviously needs to be different from normal bacteria. The more different it is, the more likely it becomes that the new bacteria "eats" stuff that isn't found at normal human temperatures.
Point being, if you can't just boil it in a pressure cooker (allows the water to get hotter than 100 °C) or kill it with UHT (ultra-high-temp processing), it probably wasn't that dangerous anyways. Similarly, if it normally thrives at -100 °C, it probably isn't used to water-based environments, so if you just get rid of whatever chemical it's used to, it dies. And most organic things probably don't have that chemical, so we're safe.
So the simple answer is: For any bacteria that's still dangerous, we just freeze it a little colder and/or heat it a little hotter because there's still a finite limit on what temperatures the bacteria can live in.
But maybe this bacteria is dangerous and survives at ranges so cold or hot you have to destroy the food to kill the bacteria. So we need other methods of
extermination food preservation.
2. Correct pH levels.
You can kill a lot of bacteria with acid, like vinegar, tomato juice, lemon juice, or lime juice. This is how salsas are often made so they can stay edible weeks after you opened them, and is a form of pickling.
Acidity is one method of fermentation. The other method uses alcohol.
Alternately, you can make the food too alkaline, using lye.
You can dry food, which doesn't leave the bacteria any water to survive off of.
Salting involves covering the food in salt, which absorbs the moisture nearby. Since salt is edible, we live, the bacteria don't.
You can vacuum-seal food to starve bacteria of fresh oxygen.
Jellying a food keeps it fresh by starving bacteria of oxygen.
Smoking covers food with anti-oxidants, but normally doesn't penetrate into the food. So it's usually just a partial measure, and is used with another method.
5. Other Methods
There are a lot of other methods, many listed on the wiki article I linked above. But here are some of the ones I found interesting.
Pascalization involves putting the food under really high pressure. ("Pascal" is a guy who did a lot of work with, among other things, pressure, and is also a unit of pressure, so the name basically means "pressurization".) The pressures get up to thousands of times normal atmospheric pressure, and render the bacteria inert.
Irradiation (yes, that kind of radiation) kills the bacteria the same way radiation kills humans, but doesn't make the food radioactive or harmful. It's not currently used a lot, but has been used in fruits and vegetables, meats, and spices.