Example 3 (38th Austrian Mathematical Olympiad) Find all non-negative integers $a(a<2007)$, such that $x^{2}+a \equiv 0(\bmod 2007)$ has exactly two distinct non-negative integer solutions less than 2007.
Since $2007=3^{2} \times 223$, we have
$x^{2}+a \equiv 0(\bmod 2007)$.
The number of solutions to this congruence modulo 2007 is equal to the product of the number of solutions to $x^{2}+a \equiv 0(\bmod 9)$ and $x^{2}+a \equiv 0(\bmod 223)$.
Since $x^{2} \equiv 0,1,4,7(\bmod 9)$, we have
when $a \in\{1,3,4,6,7\}$, $x^{2}+a \equiv 0(\bmod 9)$ has no solutions;
when $a \in\{2,5,8\}$, there are two solutions;
when $a=0$, there are three solutions.
If $-a \in S=\left\{b_{i} \mid b_{i} \equiv i^{2}(\bmod 223), 0<b_{i}<223, i=1,2, \cdots, 111\right\}$, then $x^{2}+a \equiv 0(\bmod 223)$ has two solutions;
if $-a \notin S \cup\{0\}$, then there are no solutions;
when $a=0$, there is one solution.
Therefore, the original congruence equation can only have two solutions if $x^{2}+a \equiv 0(\bmod 9)$ has two solutions and $x^{2}+a \equiv 0(\bmod 223)$ has one solution.
Let $a=223 b$.
Since $223 \equiv-2(\bmod 9)$ and $-2$ is a quadratic residue modulo 9, $-b$ is also a quadratic residue modulo 9.
Thus, $b=2,5,8$.
Hence, $a=2 \times 223=446, a=5 \times 223=1115, a=8 \times 223=1784$.