Example 3 Find all values of $a$ such that the roots $x_{1}, x_{2}, x_{3}$ of the polynomial $x^{3}-6 x^{2}+a x+a$ satisfy 
$$
\left(x_{1}-3\right)^{2}+
\left(x_{2}-3\right)^{3}+\left(x_{3}-3\right)^{3}=0 \text {. }
$$
(1983 Austrian Olympiad Problem)
Let $y=x-3$, then $y_{1}=x_{1}-3, y_{2}=x_{2}-3$ and $y_{3}=x_{3}-3$ are the roots of the polynomial
$$
(y+3)^{3}-6(y+3)^{2}+a(y+3)+a=y^{3}+3 y^{2}+(a-9) y+4 a-27
$$

By Vieta's formulas, we have
$$
\left\{\begin{array}{l}
y_{1}+y_{2}+y_{3}=-3, \\
y_{1} y_{2}+y_{1} y_{3}+y_{2} y_{3}=a-9, \\
y_{1} y_{2} y_{3}=27-4 a .
\end{array}\right.
$$

At this point, by assumption, we also have $y_{1}^{3}+y_{2}^{3}+y_{3}^{3}=0$.
It is not difficult to verify that the following identity holds:
$$
y_{1}^{3}+y_{2}^{3}+y_{3}^{3} \equiv\left(y_{1}+y_{2}+y_{3}\right)^{3}-3\left(y_{1} y_{2}+y_{2} y_{3}+y_{1} y_{3}\right) \cdot\left(y_{1}+y_{2}+y_{3}\right)+3 y_{1} y_{2} y_{3} \text {. }
$$

From this, we get that the necessary and sufficient condition for $a$ to meet the requirements of the problem is
$$
0=(-3)^{3}-3(a-9)(-3)+3(27-4 a)=-27-3 a \text {, }
$$

Thus, $a=-9$.