The complex analysis way:
The condition $\lvert a_n\rvert \leqslant K e^{-Mn}$ yields $\sqrt[n]{a_n} \leqslant \sqrt[n]{K}\cdot e^{-M}$, and hence we find
$$\frac{1}{R} = \limsup_{n\to\infty} \sqrt[n]{a_n} \leqslant \lim_{n\to\infty} \sqrt[n]{K}e^{-M} = e^{-M}$$
for the radius of convergence $R$ of the power series
$$U(w) = \sum_{n = 0}^{\infty} a_n w^n$$
by the Cauchy-Hadamard formula. So $U$ is a holomorphic function defined at least on the disk $D_{e^M}(0) = \{ z \in \mathbb{C} : \lvert z\rvert < e^M\}$. The composition of holomorphic functions is holomorphic, so
$$\tilde{u} \colon z \mapsto U(e^{iz}) = \sum_{n = 0}^{\infty} a_n \bigl(e^{iz}\bigr)^n = \sum_{n = 0}^{\infty} a_n e^{inz}$$
is holomorphic on every open set where it is defined. Since $\lvert e^{\zeta}\rvert = e^{\operatorname{Re} \zeta}$, $\tilde{u}$ is defined (and hence holomorphic) at least on the set $\{ z \in \mathbb{C} : e^{\operatorname{Re} (iz)} < e^M\}$. Since the exponential function is monotonically increasing on $\mathbb{R}$ and $\operatorname{Re} (iz) = -\operatorname{Im} z$, this last set is the half-plane where $-\operatorname{Im} z < M$, or equivalently $\operatorname{Im} z > -M$. This half-plane contains the real axis, and $u$ is the restriction of $\tilde{u}$ to the real axis.
Every holomorphic function is analytic on its domain, i.e. it can be expanded into a power series around every point $z_0$ in its domain. Further, the power series represents that function at least on the largest disk with centre $z_0$ contained in the domain. Since for every $x_0 \in \mathbb{R}$ the disk $D_M(x_0) = \{ z \in \mathbb{C} : \lvert z-x_0\rvert < M\}$ is contained in the half-plane $H_M = \{ z \in \mathbb{C} : \operatorname{Im} z > -M\}$, it follows that $\tilde{u}$ has a power series expansion
$$\tilde{u}(z) = \sum_{n = 0}^{\infty} b_n (z - x_0)^n$$
that represents $\tilde{u}$ at least on the disk $D_M(x_0)$. Restricting $z$ to be real then gives the power series representation
$$u(x) = \sum_{n = 0}^{\infty} b_n (x - x_0)^n$$
at least on the interval $(x_0 - M, x_0 + M)$.