Let $G=\mathrm{SO}(n)$ for $n\geq 3$ and consider some element $x\in\mathfrak{so}(n)$. Let $H\subseteq G$ be the subgroup $H:=\{g\in G\mid gxg^T=x\}$. I know that $H$ is a compact, connected Lie subgroup of $G$.
I am interested in understanding if $\pi_2(G/H)$ is a free abelian group, or if it can have some torsion elements.
From the homotopy sequence, I know that $$1\rightarrow \pi_2(G/H)\rightarrow \pi_1(H)\rightarrow \mathbb{Z}_2$$ is an exact sequence. As $H$ is a Lie group, $\pi_1(H)$ is a finitely generated abelian group. However, I do not know if the potential torsion part of $\pi_1(H)$ is always contained in the kernel of $\pi_1(H)\rightarrow \mathbb{Z}_2$.
It is true that $\pi_2(G/H)$ is a free abelian group. In fact, this is true for any compact, connected Lie group $G$.
The quotient $G/H$ is diffeomorphic to the adjoint orbit of $x$ given by $$\left\{\mathrm{Ad}_gx\mid g\in G\right\}.$$ This is because $G$ acts properly on its Lie algebra $\mathfrak{g}$ via the adjoint representation.
The adjoint orbit of $x$ is a generalized flag manifold. Letting $G^\mathbb{C}$ be the complexification of $G$, there is some parabolic subgroup $P\subseteq G^\mathbb{C}$ such that $G/H\simeq G^\mathbb{C}/P$. For more about this, see here.
The quotient $G^\mathbb{C}/P$ is a CW complex with cells in only the even dimensions. This means, in particular, that $G/H$ is simply-connected (it is connected as the image of a connected set). By Hurewicz, $\pi_2(G/H)\simeq H_2(G/H)$. Therefore, $\pi_2(G/H)$ is a free abelian group.