Solving for a general concave (convex) sequence, equality holds for constant sequences or arithmetic sequences. By trying $a_{i}=1(i=1,2, \cdots, n)$, we get $\lambda(n) \leqslant \frac{n(n+1)^{2}}{4}$.
Below, we prove this using mathematical induction.
The base case is relatively simple. Assume that
$$
\sum_{i=1}^{n} a_{i}^{2} \leqslant \frac{4}{n(n+1)^{2}}\left(\sum_{i=1}^{n} i a_{i}\right)^{2} \text {. }
$$

Consider the case for $n+1$, we only need to prove:
$$
\begin{array}{l}
\left(\sum_{i=1}^{n} i a_{i}+(n+1) a_{n+1}\right)^{2} \\
\geqslant \frac{(n+1)(n+2)^{2}}{4}\left(\frac{4}{n(n+1)^{2}}\left(\sum_{i=1}^{n} i a_{i}\right)^{2}+a_{n+1}^{2}\right) . \\
\text { Let } \sum_{i=1}^{n} i a_{i}=\frac{n(n+1)}{2} A .
\end{array}
$$

It is easy to see that $A \leqslant a_{n+1}$.
Then we only need to prove:
$$
\begin{array}{l}
\frac{n}{4}\left(a_{n+1}-A\right)\left((3 n+4) A-n a_{n+1}\right) \geqslant 0 \\
\Leftrightarrow A \geqslant \frac{n}{3 n+4} a_{n+1} \\
\Leftrightarrow \sum_{i=1}^{n} i a_{i} \geqslant \frac{n^{2}(n+1)}{2(3 n+4)} a_{n+1} .
\end{array}
$$

By property 1, we get
$$
\begin{array}{l}
\frac{a_{i}}{i} \geqslant \frac{a_{n+1}}{n+1} \Rightarrow a_{i} \geqslant \frac{i}{n+1} a_{n+1} \\
\Rightarrow \sum_{i=1}^{n} i a_{i} \geqslant \frac{a_{n+1}}{n+1} \sum_{i=1}^{n} i^{2}=\frac{n(2 n+1)}{6} a_{n+1} \\
\quad \geqslant \frac{n^{2}(n+1)}{2(3 n+4)} a_{n+1} .
\end{array}
$$
Example 4 Given an integer $n \geqslant 2$. Find the largest constant $\lambda(n)$ such that if the real sequence $a_{0}, a_{1}, \cdots, a_{n}$ satisfies:
$$
\begin{array}{l}
0=a_{0} \leqslant a_{1} \leqslant \cdots \leqslant a_{n}, \\
2 a_{i} \geqslant a_{i+1}+a_{i-1}, \\
\text { then }\left(\sum_{i=1}^{n} i a_{i}\right)^{2} \geqslant \lambda(n) \sum_{i=1}^{n} a_{i}^{2} .
\end{array}
$$