New York has a well funded pension plan because they have centralized control (it’s governed by a separately elected state official), there’s good governance around it and the law makes it difficult for local government to short their contributions.
Illinois and New Jersey took a more yolo approach and their funds are essentially insolvent.