So what if IC is not as in that question? $x^2e^{-x^3}$, say? Can we still use this or similar result?

Sometimes... but usually not. F.e. solving Cauchy problem for

\begin{align}

&u_t- ku_{xx}=0,\tag{*}\\

&u|_{t=0}=x^2e^{-ax^2}\tag{**}

\end{align}

the same way would work: again, we know that $v(x,t)=t^{-1/2}e^{-x^2/4kt}$ satisfies (*), and for $t=t_0$ (find it) gives us $Ce^{-ax^2}$....

You need to know the regular way, cutting corners works sometimes ... but usually does not