Suppose $u\in C^1(I\to\mathbb{C})$, where $I\subset\mathbb{R}$, is a solution to the ODE \begin{cases} u'(t) = |u|^2u \\ u(0) = a \in\mathbb{C}. \end{cases}
Without solving the ODE, can we way that $u\in C^{\infty}(I)$? Is it true if the right hand side is any polynomial of $u$?
If I expand this to a PDE, say $u\in C^1_tW^{5,2}_x(I\times\mathbb{R}^n\to\mathbb{C})$ is a solution to the PDE \begin{cases} \partial_t u = \Delta_x u + |u|^2u \\ u(0,x) = u_0 \in W^{5,2}, \end{cases} then can I say $u\in C^{\infty}_t$?
Yes, solutions of ODE $u'=f(u)$ with $C^\infty$-smooth $f$ are themselves $C^\infty$-smooth in the domain of existence. This follows from "bootstrapping" argument:
$u\in C^0$ $\implies$ $f\circ u\in C^0$ $\implies$ $u\in C^1$ $\implies$ $f\circ u\in C^1$ $\implies$ $u\in C^2$ $\implies \dots$
(It should be noted that the domain of existence $I$ may be rather small, depending on $f$ and initial condition: e.g. $u'=|u|^2u$ is guaranteed to blow up in finite time.)
Regularity of PDE with that nonlinear term is a more delicate manner, and I do not have an answer. Consider Example 6.11 here, which shows how some Fourier coefficients of $u$ may be blowing up, losing the smoothness of solution. The issue is that with the PDE, the aforementioned blow-up does not necessarily mean the complete destruction of solution: it may be just that some higher frequencies increase in magnitude, making it not very smooth. I suggest using the key terms "regularity for semilinear wave equation" in your search.