To be fair, if Chelsea are asking 40m it means they'd accept 35m in all likelihood. Which is kind of the range I expected.
If you look at some comparable transfers in the last 18 months (all CMs aged 23-27):
Partey to Arsenal, 45m
Van de Beek to United, 35m
Lo Celso to Spurs, 30m
Rodri to City, 56m
Kovacic to Chelsea, 40m
Ndombele to Spurs, 54m
Bruno to United, 50m
Tielemans to Leicester, 40m
Doesn't seem like Barkley would be out of place in that list? You could argue that Villa aren't as big as most of those clubs but that's what happens when you have very wealthy owners, the prices go up. If Villa can pay 27m for Watkins from the Championship, I don't think 35m or so for Barkley (who is a proven PL player with 33 England caps) would be an unreasonable ask.
The advantage for Villa is having him on loan, that way you can see how he fits in at the club, how he trains and plays. He can also see whether he fancies Villa to be able to match his ambitions, he's not a player for a bottom-half team. So far it looks like a good match.
Last thing to bear in mind is that it's by no means settled that he has no future at Chelsea. He played 31 games last season and 48 the season before and is liked by the fans. It's more a matter of whether he prefers being a squad player at a CL team or a 1st team regular at a team that is (maybe) competing to get into the top 6 or 8. Either way, you have a motivated player for this season that enjoys being at Villa and will relish playing every week. Seems like a no-lose situation to me.