The state’s struggle to keep working-age people is threatening its economy.