The opening of school here in September almost had the feel of a memorial service.

Teachers from across the city descended on the high school where 80 yellow ribbons had been fastened to seats throughout the auditorium. Superintendent Kathleen Smith, in a grim voice, told everyone to look to the left and to the right: Each ribbon represented a colleague whose position had been cut over the summer in a painstaking effort to plug a $16 million budget gap.

Many teachers, though, needed no symbolic reminders of the departed: Years of painful cuts have left many of them with more students in their classrooms than they ever imagined, in many cases far exceeding acceptable levels in the affluent suburbs. Resources are running thin, too. Brockton was able to spend just $1.28 per student on classroom supplies during the 2016-17 school year, while Weston, one of the wealthiest towns in the state, provided $275 per student.

“The kids are the ultimate victims,” said Mark Richardson, a social studies teacher who delivers lessons on medieval times to 41 students in a middle school library that has been converted into a classroom. “It’s a shame what is happening here.”