South Hadley is a “canary in the coal mine” as local governments nationwide face the end of pandemic aid and rising costs.