I live in Madrid. Absolutely love it. I have small kids and it's fantastic for them, sunshine 300+ days a year, always playing outside, good schools, very family-friendly culture with kids welcome just about everywhere. Gorgeous well-maintained parks and playgrounds, the city in general is clean, cared for, very safe. Last weekend I was wandering through Plaza de España watching my kids playing on a (free) giant wooden slide park, drinking a €2 coffee, with the sun shining, and I felt incredibly lucky to be here.
BUT - as pp have said, it's much harder to get visas now. We came pre-Brexit. The job market is challenging. Unless you have a very marketable skill, you need to speak Spanish to a good level or you'll be stuck with teaching assistant/ call centre roles that do not pay well at all. Renting is expensive and flats tend to be small. The bureaucracy is a nightmare, although made much easier if you speak good Spanish. I don't need a gestor, I do it all myself now. But if you hit a problem you will need to be incredibly persistent and patient to sort it out.
Salaries even in good jobs are considerably lower than U.K. although I think tax probably works out similar considering the equivalent of NI is largely paid by employers. That said, outside tourist zones, prices are much lower than in similar cities in UK. Coffee for a couple of euros, coffee and a tostada or tortilla for breakfast maybe €4-5, 3 course lunch for €15, fresh fruit and veg much much cheaper (and in season, MUCH tastier). It's true supermarkets are not as nice, and you can forget M&S style pre-prepared options. Biscuit aisles are a sad disappointment 😭 You cook more, or you eat out. In general though, I think salaries here do go further.
Ultimately everyone's experience is going to be different. I'd be bored on the coast, but then I wouldn't choose to live somewhere like that in the UK either. If I compare Madrid with pretty much any UK city I know well, it wins hands down. My kids are growing up bilingual. The mortgage on our apartment is 2.5% fixed for life. I can't even begin to imagine how much more expensive our life would be in the U.K.
As a veteran of several overseas moves, I definitely recommend renting your U.K. home and giving it a year to begin with. Your kids are young enough that you can risk it. But do your research first, and don't go without a work visa, no one will employ you. Happy to answer any questions if I can.