This gets complicated because the 90-in-180 is the EU's remit whereas time spend over 90 days in any one country comes under each country's immigration law.
I actually asked the EU (look for "Europe Direct" on europa.eu) about this ("If Mr EU and Ms Non-EU go to Spain for 88 days, how long do they have to spend in France before they can go back to Spain") and the reply was basically "Not the EU's issue".
Note also that if you spend more than 183 days in Spain (or most other countries) in a calendar year, you automatically become a tax resident of Spain (etc) simply by virtue of having spent more than half the year there. If in addition you have not registered as resident in the EU/foreigners registry sense, then you are now committing outright evasion of Spanish (etc) taxes.
There is a related issue with Brits who own second homes in Spain where they spend the winter (the so-called "swallows"). Pre-Brexit they might come from, say, 1 November to 31 March, which is 5 months. Now, under a strict interpretation of 2004/38/EC you were meant to register as resident in Spain around day 90, and then deregister when you left to go back to the UK after day 150. This didn't happen for a a few reasons: (1) The UK citizens concerned couldn't be arsed, (2) Spain couldn't be arsed, and (3) while the EU Directive is based on the idea that registration involves turning up at a police station one morning and completing the process in 10 minutes, Spain (and probably some other EU countries, but Spain is particularly egregious) turns it into a whole palaver that can take more than 2 months to complete anyway.
There are groups of these "swallows" campaigning to try and get 90-in-180 not to apply to them. I have some sympathy in that not many of them voted for Brexit (those that did, fuck 'em), but they do tend to lay it on a bit thick. For one thing I suspect quite strongly that as well as 5 months in the winter a lot of them were also having enough weeks in the rest of the year that they were going over the 183 days, but they didn't want to pay Spanish taxes and they knew that enforcement of rules for EU citizens is quite rare in Spain.