Moody’s says shrinking workforces and rising health and pension costs will weigh on growth and government budgets across Western economies.