Representing $p(x) = c_0 + c_1x + \cdots + c_nx^n$ and $\textbf{c} = (c_0, \cdots, c_n)$, we can express
\begin{align*}
\frac{d}{d\textbf{c}} \|f - p\|^2 &= -2 \int_a^b(f(x) - p(x)) \begin{pmatrix}
1 \\ x \\ \vdots \\ x^n \end{pmatrix} dx \overset{\text{set}}{=} 0 \\
\frac{d}{d\textbf{c}d\textbf{c}^\intercal} \|f - p\|^2 &= 2 \int_a^b\begin{pmatrix}
1 \\ x \\ \vdots \\ x^n \end{pmatrix}\begin{pmatrix}
1 \\ x \\ \vdots \\ x^n \end{pmatrix}^\intercal dx \succ 0
\end{align*}
Since the Hessian is positive-definite everywhere, the solution, $q$, to the vector of first-derivatives is a unique global minimum. This implies that
\begin{align*}
\int_{a}^{b}(f(x) - q(x)) x^k = 0
\end{align*}
for all $k = 0, \cdots, n$. By the Intermediate Value theorem, there exists a $x_k \in (a, b)$ such that
\begin{align*}
(f(x_k) - q(x_k))x_k^k(b-a) = \int_{a}^{b}(f(x) - q(x)) x^k = 0 \implies f(x_k) = q(x_k)
\end{align*}
And since $\{1, \cdots, x^n\}$ are linearly independent, these $\{x_k\}$ will all be distinct as well.