Millions of people are under a heatwave warning after a bushfire forced hundreds of outback residents to flee their homes.