Rescue workers in Spain saved thousands of people from rising waters as record rainfall pounded the southeast of the country.