Example 2 Let the domain of the continuous function $f(x)$ be $(-\infty,+\infty)$. And the polynomial $g(x)=a x^{2}+b x+c$ satisfies $f[g(x)] \geqslant g[f(x)]$, where $a, b, c$ are any real numbers. Try to find $f(x)$.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
Given the arbitrariness of the coefficients of the polynomial $g(x)$, we know that $g(x)$ is actually the set of zeroth, first, and second-degree polynomials. Since $f(g(x)) \geqslant g(f(x))$, we have
$$
f\left(a x^{2}+b x+c\right) \geqslant a f^{2}(x)+b f(x)+c .
$$

By the arbitrariness of the real numbers $a, b, c$, we know that it also holds for $a=0, b=1$, i.e.,
$$
f(x+c) \geqslant f(x)+c, \quad f(x+c)-f(x) \geqslant c .
$$

When $c>0$, $\frac{f(x+c)-f(x)}{c} \geqslant 1$, letting $c \rightarrow 0$, we get $f^{\prime}(x) \geqslant 1$;
When $c<0$, $\frac{f(x+c)-f(x)}{c} \leqslant 1$, letting $c \rightarrow 0$, we get $f^{\prime}(x) \leqslant 1$;
Thus, $f^{\prime}(x)=1, f(x)=x+t (t \in \mathbf{R})$,
Substituting back into (1) gives $a x^{2}+b x+c+t \geqslant a(x+t)^{2}+b(x+t)+c$,
which holds for all $x \in \mathbf{R}$, leading to $t=0$, so $f(x)=x$.