You can also check that it is true via the real Jordan normal form.
First if we have a complex eigenvalue $\alpha + i \beta$ and one real eigenvalue $\lambda$, then $A$ is (after conjugation) of the form
$$ A = \begin{pmatrix} \alpha & \beta & 0 \\ -\beta & \alpha & 0 \\ 0 & 0 & \lambda
\end{pmatrix} $$
and thus
$$ det(A^2 + I) = det \begin{pmatrix} \alpha^2-\beta^2+1 & 2\alpha \beta & 0 \\ -2\alpha \beta & \alpha^2 - \beta^2+1 & 0 \\ 0 & 0 & \lambda^2 +1
\end{pmatrix}
= (\lambda^2+1) \left( (\alpha^2 - \beta^2+1)^2 + 4\alpha^2 \beta^2 \right) $$
Now we consider the case when all the eigenvalues $\lambda, \mu, \nu\in \mathbb{R}$.
If they are all simple, then we get $det(A^2 + I) = (\lambda^2 +1) (\mu^2 +1) (\nu^2+1)$.
If one of the eigenvalues has multiplicity 2, then $A$ is (after conjugation) of the form
$$ A = \begin{pmatrix} \lambda & 1 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \mu
\end{pmatrix} $$
and thus
$$ det(A^2 + I) = det \begin{pmatrix} \lambda^2+1 & 2\lambda & 0 \\ 0 & \lambda^2+1 & 0 \\ 0 & 0 & \mu^2
\end{pmatrix}
= (\lambda^2+1)^2 (\mu^2+1) $$
Finally, we are left to consider the case when we have one eigenvalue of multiplicity 3, then $A$ is (after conjugation) of the form
$$ A = \begin{pmatrix} \lambda & 1 & 0 \\ 0 & \lambda & 1 \\ 0 & 0 & \lambda
\end{pmatrix} $$
and thus
$$ det(A^2 + I) = det \begin{pmatrix} \lambda^2+1 & 2\lambda & 1 \\ 0 & \lambda^2+1 & 2\lambda \\ 0 & 0 & \lambda^2 +1
\end{pmatrix}
= (\lambda^2 + 1)^3 $$