There’s a market at work here. School teachers are underpaid because they like the job, prefer it to working in The City or the civil service. MPs are underpaid (relative to the middle-ranking managers they compare themselves to) because of the job’s many (quite legitimate) privileges: the pleasures of public service, status, lucrative director’s gigs and so on.
You can tell the market is working because there’s no apparent shortage of MPs (in fact there are dozens of candidates for every vacancy and the waiting list is years long). MPs should not use their unique position, a position in which they are granted control over their own remuneration, to buck the market.
I’m sympathetic to the argument that we should try to attract highly-qualified people to seats in Parliament but I suspect that the salary is not the big problem. The appropriate response to feeling undervalued would be to take the revolving door back to a job in the legal profession or in business.