Polynomial characterizations of (H, F)-invariant subspaces with applications