Like you, I'm older than dijit and went to school in the home counties, but my experiences were also unpleasant enough for me to question the value of my time at school. I went to non-selective "state" (i.e. public-sector) schools in a middle-class area where nearly all of the other pupils presented as working class. Somehow I managed to pick up a combination of working, middle and upper class mannerisms, which seemed to attract more bullying from authority figures than from my peers. I suspect many of my teachers were bitterly resentful about the (then recent) banning of corporal punishment in the state sector. My secondary school seemed to model itself on "public" (i.e. private) schools, where corporal punishment was still legal. The saving graces of my school days included:

1) My primary school clearly took children's advancement seriously (more in things like handwriting, bladder control and cycling proficiency than in subject-matter knowledge or understanding), so it wasn't all pain and no gain, but that mostly stopped at secondary school.

2) Secondary-school maths lessons were (usually) something of a haven because maths teachers were willing to engage in unplanned reasoned argument and for almost three years we worked independently, at our own pace, from booklets while the teacher gave us each in turn one-on-one tuition (for only one or two minutes per lesson, but it did mean that I escaped being uncomfortably pressured to speed up or slow down both when I was working independently and when I had the teacher's attention for a non-punitive reason).

I think British education would be better if secondary schools had a clearer purpose and treated pupils as stakeholders. My experience was that my formal education started at primary school and resumed at university after a seven-year gap. I never really found out how my secondary school was meant to benefit pupils. Pupils ought to not only benefit from school, but understand how it benefits them.

I think schools should reflect clearer thinking about ability-based selection. If pupils are grouped by age and location only, and not at all by ability, then requiring the whole class to work through the same material, in the same way, at the same pace risks seriously inhibiting subject-matter learning. On the other hand, grouping pupils by "general ability" risks putting pupils in some classes more or less advanced than those that would benefit them most, and permanently disadvantaging those who are rejected from the more prestigious academic path at an early age.

Pupils also ought to lead lives they have reason to value. Corporal punishment even for bullies is a net negative, and there should be meaningful protections against teachers using loopholes, such as turning a blind eye to bullying or perpetrating emotional abuse themselves. We had many teachers like that at my secondary school, and one of them was found to have assaulted a pupil while I was there.

Edit:

I think some important points aren't really clear above. I agree with dijit that school can provide pupils with very poor value for the burdens it places on them, but I consider this a missed opportunity, rather than a lost cause. I also suspect some teachers' toxic attitudes about class and violence contribute to the bullying problem, so we should be careful not to let cognitive biases lead us into doubling down on "discipline" in schools, unless there's good reason to believe that isn't part of the problem. I left school many years ago, but before I did, authority figures bemoaned the "end of discipline" and the coddling of pupils, which was at odds with my experience then, so I'm sceptical of any claims that the problem has since been solved.