I think part of the issue is whether people are comparing like for like, and misunderstandings on both sides can cause resentment.
For example, I have a job as an accountant in a Big 4 firm - something which is recognised generally as being 'high paid' (and reasonably high stress etc.)
I have a very close friend who is a teacher. When comparing the two at 5 years post grad:
Myself:
All As / A* at GCSE and A level. 2:1 from a Russell group uni, 2 years studying for accountancy exams whilst working full time.
Work life balance now - generally work 9am - 6:30 (ish, can be a lot later) and get 25 days hol plus bank holidays.
My take home pay after student loan deductions and pension deductions (me paying in 8% and company paying in 12%) is c.£2400.
My forecast pension is set to pay out about £12k when I retire if i took an annuity.
My teacher friend:
A/B/C at GCSE and A level. Got a 2:1 from a poly, 1 year teacher training.
She is currently a head of year with additional responsibilities so gross pay of c.£35k (I don't know her exact take home but say £2140 taking into account student loan and pension).
Her pension contributions are not dissimilar to mine (c.9.6%) however, this will entitle her to a 'career average' payout, far exceeding my very paltry £12k per year. Therefore, whilst the pay is definitely lower, the pension is very valuable.
She also gets a significant number of holidays a year (some of which will be used for marking).The greater time off means she has the option of either making additional money through exam marking (she got about £2k last year) and she could tutor.
Should either of us have children, she would be able to save a fortune in not paying for school holiday childcare costs.
Therefore, on balance, each carer path has different pros and cons, but teaching, when taking into account the whole package (e.g. the pension, time off, scope to make additional income) is not that noncompetitive when compared to similar roles.
The difference, is the working environment that comes with being a teacher, and it takes a very dedicated person to do that.
The above is a very long winded way of saying that the pay is not 'bad' for being a teacher when looking at everything, it just takes a specific type of person to do it, and given the current staffing levels, the pay should be increased as it is not enticing people in!