9. Let $n(n \geqslant 2)$ be a positive integer, find all real-coefficient polynomials $P(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{0}$, such that $P(x)$ has exactly $n$ real roots no greater than -1, and $a_{0}^{2}+a_{1} a_{n}=a_{n}^{2}+a_{0} a_{n-1}$.
9. From the conditions, we can set $P(x)=a_{n}\left(x+\beta_{1}\right)\left(x+\beta_{2}\right) \cdots\left(x+\beta_{n}\right)$.

Here $\beta_{i} \geqslant 1, i=1,2, \cdots, n$, and $a_{n} \neq 0$. Using $a_{0}^{2}+a_{1} a_{n}=a_{n}^{2}+a_{0} a_{n-1}$, we have
$$
a_{n}^{2}\left(\prod_{i=1}^{n} \beta_{i}\right)^{2}+a_{n}^{2}\left(\prod_{i=1}^{n} \beta_{i}\right) \sum_{i=1}^{n} \frac{1}{\beta_{i}}=a_{n}^{2}+\left(\prod_{i=1}^{n} \beta_{i}\right)\left(\sum_{i=1}^{n} \beta_{i}\right) a_{n}^{2} \text {, }
$$

Thus, $\prod_{i=1}^{n} \beta_{i}-\frac{1}{\prod_{i=1}^{n} \beta_{i}}=\sum_{i=1}^{n} \beta_{i}-\sum_{i=1}^{n} \frac{1}{\beta_{i}}$.
We will use mathematical induction on $n$ to prove that when $\beta_{i} \geqslant 1, i=1,2, \cdots, n$, we have
$$
\prod_{i=1}^{n} \beta_{i}-\frac{1}{\prod_{i=1}^{n} \beta_{i}} \geqslant \sum_{i=1}^{n} \beta_{i}-\sum_{i=1}^{n} \frac{1}{\beta_{i}},
$$

with equality holding if and only if $n-1$ of $\beta_{1}, \beta_{2}, \cdots, \beta_{n}$ are equal to 1.
When $n=2$, if $\beta_{1}, \beta_{2} \geqslant 1$, then the following equivalent relations hold:
$$
\begin{aligned}
& \beta_{1} \beta_{2}-\frac{1}{\beta_{1} \beta_{2}} \geqslant\left(\beta_{1}+\beta_{2}\right)-\left(\frac{1}{\beta_{1}}+\frac{1}{\beta_{2}}\right) \\
\Leftrightarrow & \left(\beta_{1} \beta_{2}\right)^{2}-1 \geqslant\left(\beta_{1}+\beta_{2}\right)\left(\beta_{1} \beta_{2}-1\right) \\
\Leftrightarrow & \left(\beta_{1} \beta_{2}-1\right)\left(\beta_{1}-1\right)\left(\beta_{2}-1\right) \geqslant 0 .
\end{aligned}
$$

Therefore, the proposition holds when $n=2$.
Assume the proposition holds for $n=k$. Then for $n=k+1$, let $\alpha=\beta_{k} \beta_{k+1}$. By the induction hypothesis, we have
$$
\prod_{i=1}^{k+1} \beta_{i}-\frac{1}{\prod_{i=1}^{k+1} \beta_{i}} \geqslant\left(\sum_{i=1}^{k-1} \beta_{i}-\sum_{i=1}^{k-1} \frac{1}{\beta_{i}}\right)+\alpha-\frac{1}{\alpha},
$$

with equality holding if and only if $k-1$ of $\beta_{1}, \beta_{2}, \cdots, \beta_{k-1}, \alpha$ are equal to 1.
From the case $n=2$, we know

Thus,
$$
\alpha-\frac{1}{\alpha}=\beta_{k} \beta_{k+1}-\frac{1}{\beta_{k} \beta_{k+1}} \geqslant \beta_{k}+\beta_{k+1}-\frac{1}{\beta_{k}}-\frac{1}{\beta_{k+1}} .
$$

Therefore, $\prod_{i=1}^{k+1} \beta_{i}-\frac{1}{\prod_{i=1}^{k+1} \beta_{i}} \geqslant \sum_{i=1}^{k+1} \beta_{i}-\sum_{i=1}^{k+1} \frac{1}{\beta_{i}}$,
with equality holding if and only if $k-1$ of $\beta_{1}, \beta_{2}, \cdots, \beta_{k-1}, \alpha$ are equal to 1, and one of $\beta_{k}$ and $\beta_{k+1}$ is equal to 1. This is equivalent to $k$ of $\beta_{1}, \beta_{2}, \cdots, \beta_{k+1}$ being equal to 1.

From the above conclusion and (1), we know that polynomials of the form $P(x)=a_{n}(x+1)^{n-1}(x+\beta), a_{n} \neq 0, \beta \geqslant 1$ are all the polynomials that satisfy the conditions.