Example 6 Let $a_{1}, a_{2}, \cdots, a_{n}(n \geqslant 2)$ be $n$ distinct real numbers, $a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}=S$. Try to find $\max \min _{1 \leqslant i<j \leqslant n}\left(a_{i}-a_{j}\right)^{2}$.
Solution: Without loss of generality, let $a_{1}>a_{2}>\cdots>a_{n}$. Denote
$$
M=\min _{1 \leqslant i<j \leqslant n}\left(a_{i}-a_{j}\right)^{2} \quad (a_{i}>a_{j} \text{ if } i<j).
$$
Thus, $\sum_{i<j}\left(a_{i}-a_{j}\right)^{2} \geqslant M \sum_{i<j}(j-i)^{2}$
$$
\begin{array}{l}
=M \sum_{k=1}^{n-1}\left(1^{2}+2^{2}+\cdots+k^{2}\right) \\
=M \sum_{k=1}^{n-1}\left[\mathrm{C}_{1}^{1}+\left(2 \mathrm{C}_{2}^{2}+\mathrm{C}_{2}^{1}\right)+\cdots+\left(2 \mathrm{C}_{k}^{2}+\mathrm{C}_{k}^{1}\right)\right] \\
=M \sum_{k=1}^{n-1}\left(\mathrm{C}_{k+1}^{2}+2 \mathrm{C}_{k+1}^{3}\right) \\
=M\left(\mathrm{C}_{n+1}^{3}+2 \mathrm{C}_{n+1}^{4}\right)=\frac{M}{12} n^{2}\left(n^{2}-1\right) .
\end{array}
$$

On the other hand, we have
$$
\begin{array}{l}
\sum_{i<j}\left(a_{i}-a_{j}\right)^{2}=(n-1) \sum a_{i}^{2}-2 \sum_{i<j} a_{i} a_{j} \\
=n \sum a_{i}^{2}-\left(\sum a_{i}\right)^{2}=n S-\left(\sum a_{i}\right)^{2} \\
\leqslant n S .
\end{array}
$$

Therefore, $\frac{M}{12} n^{2}\left(n^{2}-1\right) \leqslant n S$, which means
$$
M \leqslant \frac{12 S}{n\left(n^{2}-1\right)} \text {. }
$$

Furthermore, when $\sum a_{i}=0$ and $\left\{a_{i}\right\}$ forms an arithmetic sequence, we have
$$
M=\frac{12 S}{n\left(n^{2}-1\right)} \text {. }
$$

Hence, $\max \min _{1 \leqslant i<j \leqslant n}\left(a_{i}-a_{j}\right)^{2}=\frac{12 S}{n\left(n^{2}-1\right)}$.