Well, the first generalisation would be n>=0 instead of n>0. A 0-polynomial is a nonzero constant, and a=0 has 0 solutions for a!=0. The degree of the 0 polynomial (not to be confused with "a 0-polynomial") is undefined, so the theorem says nothing about it. To generalise further:
Define "F(x) is indentically zero" to mean that F(x)=0 for every x in the domain of F, for a real function F.
Then we get
x is a solution to F(x) = 0 for every x in the domain of F if and only if F(x) is identically zero.
That's trivial though. We can come up with more specific cases, like:
Let {y_n(x)} be a sequence of real functions with the same domain, with the property that if S is the set of all y_i(x) in {y_n(x)} that aren't identically zero, then S is a linearly independent set. Let F(x) be the sum of the sequence {a_n * y_n(x)} where the a_i are real constants. Then
F(x) = 0 for every x in the domain of F (which is, of course, the same as the domain of each of the y_i(x)) if and only if a_i = 0 whenever y_i(x) is not identically zero,
or in other words, F(x) is identically zero if and only if a_i*y_i(x) is identically zero for every i.