  The main purpose of this paper is solve polynomial equations that are
satisfied by (generalized) polynomials. More exactly, we deal with the
following problem: let $\mathbb{F}$ be a subfield of the complex field
$\mathbb{C}$, $n$ be a positive integer and $P\in \mathbb{F}[x]$ and $Q\in
\mathbb{C}[x]$ be polynomials. Our aim is to prove characterization theorems
for generalized polynomials $f\colon \mathbb{F}\to \mathbb{C}$ of degree two
that also fulfill equation \[ f(P(x))= Q(f(x)) \] for each $x\in \mathbb{F}$.
As it turns out, the difficulty of such problems heavily relies on that we
consider the above equation for generalized polynomials or for (normal)
polynomials. Therefore, firstly we study the connection between these two
notions.
