£5-£10m for a title sponsorship and livery change does seem 'cheap'to me, especially for a front-ish running team. Has the F1 rate card devalued a lot in recent years?
As Myrvold says, it has indeed declined.
Almost no numbers are ever revealed, although starting in 2014 Williams did sign a 5-year deal with Martini for $15m/yr. That was on the back of Williams having finished 9th in WCC in 2013. That same year, it was rumoured that Ron had turned down $53m/yr from GSK (roughly the same as McLaren had been getting from Vodafone for each of the previous 7 years) because in his opinion McLaren was the Manchester United of F1 and deserved a premium rate for that reason.
Bringing things up to today, one can believe that the going rate for a Williams or Rich Energy is in the $10-15m range. I could see Haas happily taking $10m/yr in what was effectively "free money": they were going to race with or without the sponsorship, there was plenty of open space on the car, and it couldn't hurt to have the car painted in one of the most famous livery combinations of all times, as opposed to being painted like a large machine tool on wheels.
Mercedes get a big multiple of that amount from Petronas, but it's justifiably proportionate. Last season Mercedes probably got at least 5 (if not 10) times as much publicity and race broadcast time as Haas and Williams did. There is also the synergy angle: often a sponsor/partner will have a deal with the team to supply (for a price) its products and services to the team owner. Mercedes sell millions of vehicles, all of which need fuel and lubricants.
Shortly after BWT began to sponsor Force India, which entailed a fundamental charge to the cars' colour scheme, a journalist asked Zak Brown, who was looking for sponsors for McLaren, whether if a sponsor demanded it McLaren too would be willing to paint their cars pink. Brown said "Yes, but it would take a lot more than what Force India are getting paid to do it."