In Every power series is the Taylor series of some $C^{\infty}$ function, Andrew Stacey pointed to Kriegl and Michor's book A Convenient Setting for Global Analysis, section 15.4. I present a version of the proof from this book below.
Let $\rho(x)$ be a bump function which is equal to $1$ in the neighborhood of $0$ and has support contained in $(-1,1)$. For any number $t_k>1$, to be chosen later, the function $f_k(x) = \dfrac{a_k}{k!} x^k \rho(t_k x)$ has the desired $k$th derivative at $0$, with all other derivatives vanishing at $x=0$. It remains to arrange $t_k$ so that the series $\sum f_k$ converges to a $C^\infty$ function; that is, the series of $n$th derivatives $f_k^{(n)} $ converges uniformly, for every $n$.
It suffices to consider $k\ge 2n$. We have
$$f_k^{(n)}(x) = a_k \sum_{m=0}^n \binom{n}{m}\dfrac{1}{(k-m)!} x^{k-m} t_k^{n-m}\rho^{(n-m)}(t_k x) $$
Let $B_n=\max_{m\le n}\sup |\rho^{(m)}|$. Since $|\rho^{(n-m)}(t_k x)|\le B_{k}\chi_{\{|x|\le t_k^{-1}\}}$, it follows that the supremum of $|f_k^{(n)}|$ is at most
$$ a_k B_k \sum_{m=0}^n \binom{n}{m}\dfrac{1}{(k-m)!} t_k^{m-k } t_k^{n-m}
\le a_k B_k t_k^{-k/2}\sum_{m=0}^n \binom{n}{m}\dfrac{1}{(k-m)!} $$ Let $M_k$ denote the maximum of $\sum_{m=0}^n \binom{n}{m}\frac{1}{(k-m)!}$ over $n\le k/2$. Whatever $a_k$, $B_k$ and $M_k$ are, we can choose $t_k$ large enough so that
$$
a_k B_k M_k t_k^{-k/2} \le 2^{-k}
$$
and uniform convergence follows.