It varies state to state and district to district, but in general teachers get very good healthcare plans and a pension. When I compared notes with my teacher friend, I found that his benefits package would be worth about $15k a year (assuming the pension plan is well run). And let's not forget they only work 180 days a year.
While inflation has not been kind to their salary gains, it has been very kind to the pension gains. So the total compensation package has probably not changed much.