Example 5 Find all positive integers $n$ such that the indeterminate equation
$$n=x_{1}^{2}+x_{2}^{2}+\cdots+x_{5}^{2}$$

has a unique solution in integers satisfying $0 \leqslant x_{1} \leqslant x_{2} \leqslant \cdots \leqslant x_{5}$.
Using Lagrange's four-square theorem, we know that when $n \geqslant 17$, there exists the following representation:
$$\begin{aligned}
n & =x_{0}^{2}+y_{0}^{2}+z_{0}^{2}+w_{0}^{2}, \\
n-1^{2} & =x_{1}^{2}+y_{1}^{2}+z_{1}^{2}+w_{1}^{2}, \\
n-2^{2} & =x_{2}^{2}+y_{2}^{2}+z_{2}^{2}+w_{2}^{2}, \\
n-3^{2} & =x_{3}^{2}+y_{3}^{2}+z_{3}^{2}+w_{3}^{2}, \\
n-4^{2} & =x_{4}^{2}+y_{4}^{2}+z_{4}^{2}+w_{4}^{2},
\end{aligned}$$

where $0 \leqslant x_{i} \leqslant y_{i} \leqslant z_{i} \leqslant w_{i}$ are all integers, $i=1,2,3,4$.
Now, if $n \neq 1^{2}+2^{2}+3^{2}+4^{2}$, then
$$\{1,2,3,4\} \neq\left\{x_{0}, y_{0}, z_{0}, w_{0}\right\}$$

Let $k \in\{1,2,3,4\} \backslash\left\{x_{0}, y_{0}, z_{0}, w_{0}\right\}$, then by the previous conclusion, we know that $n$ has the following two different representations:
$$n=x_{0}^{2}+y_{0}^{2}+z_{0}^{2}+w_{0}^{2}=k^{2}+x_{k}^{2}+y_{k}^{2}+z_{k}^{2}+w_{k}^{2}$$

Since $30=1^{2}+2^{2}+3^{2}+4^{2}=1^{2}+2^{2}+5^{2}$, it follows that the required $n \leqslant 16$.
By verifying $n=1,2, \cdots, 16$ one by one, we find that $1,2,3,6,7$ and 15 meet the requirements, with their unique representations as follows:
$$\begin{array}{l}
1=1^{2}, 2=1^{2}+1^{2}, 3=1^{2}+1^{2}+1^{2}, 6=1^{2}+1^{2}+2^{2} \\
7=1^{2}+1^{2}+1^{2}+2^{2}, 15=1^{2}+1^{2}+2^{2}+3^{2}
\end{array}$$

While the other numbers have at least two representations:
$$\begin{aligned}
4 & =2^{2}=1^{2}+1^{2}+1^{2}+1^{2} \\
5 & =1^{2}+2^{2}=1^{2}+1^{2}+1^{2}+1^{2}+1^{2} \\
8 & =2^{2}+2^{2}=1^{2}+1^{2}+1^{2}+1^{2}+2^{2}, \\
9 & =3^{2}=1^{2}+2^{2}+2^{2} \\
10 & =1^{2}+3^{2}=1^{2}+1^{2}+2^{2}+2^{2} \\
11 & =1^{2}+1^{2}+3^{2}=1^{2}+1^{2}+1^{2}+2^{2}+2^{2} \\
12 & =1^{2}+1^{2}+1^{2}+3^{2}=2^{2}+2^{2}+2^{2} \\
13 & =1^{2}+1^{2}+1^{2}+1^{2}+3^{2}=2^{2}+3^{2} \\
14 & =1^{2}+2^{2}+3^{2}=1^{2}+1^{2}+2^{2}+2^{2}+2^{2} \\
16 & =4^{2}=2^{2}+2^{2}+2^{2}+2^{2}
\end{aligned}$$

In summary, the numbers that meet the conditions are $n=1,2,3,6,7$ or 15.