Stability of invariant maximal semidefinite subspaces. II. applications: Self-adjoint rational matrix functions, Algebraic Riccati equations