Inspired by one of the answers to this post, I constructed my own proof. In addition, I constructed a basis of the solution space. I'd like to know if the following is correct.
Let $(a_0,\ldots,a_n)\in\mathbf{C}^{n+1}$ ($a_n\neq 0$). If $I\subset\mathbf{R}$ is an open interval and $f\colon I\to\mathbf{C}$ has the property $a_0f^{(0)}+...+a_nf^{(n)}=0$, then $f\in C^{\infty}$$.^1$ This means that "solving" the differential equation is equivalent to determining the set \begin{equation} X=\left\{f\in C^{\infty}:a_0f^{(0)}+...+a_nD^nf^{(n)}=0\right\}. \end{equation} If we introduce \begin{align} D^k\colon C^{\infty}&\to C^{\infty}\\ f&\mapsto f^{(k)} \end{align} for all $k\in\mathbf{N}_0$ and \begin{equation} O:=a_0D^0+...+a_nD^n, \end{equation} then \begin{equation} X=\ker O. \end{equation} Like for all polynomials, there is a $(c_1,\ldots,c_n)\in\mathbf{C}^n$ with \begin{equation} O=a_n\prod_{k=1}^nD^1-c_kD^0=a_n\prod_{k=1}^nD-c_kI \end{equation} Thus, if we define $D-a:=D-aI$ ($a\in\mathbf{C}$), \begin{equation} X=\ker\prod_{k=1}^nD-a_k. \end{equation} $D-a$ and $D-b$ commute for all $a,b\in\mathbf{C}$, thus we can reorder the product however we want. Therefore we can concentrate on finding the kernel of an operator that has the form \begin{equation}\tag{1} (D-a_1)^{k_1}\cdots(D-a_m)^{k_m}. \end{equation} (This will allow us to construct a basis later on.)
$D-a$ has a $1$-dimensional kernel and is surjective (here is the proof), meaning that $\dim\ker O=n$ according to this post.
We can even construct a basis: \begin{align} e_n(a)\colon I&\to\mathbf{C}\\ x&\mapsto\frac{x^n}{n!}e^{ax} \end{align} Thanks to the factorial, we have $De_n(a)=e_{n-1}(a)+ae_n(a)$ for $n\in\mathbf{N}$ and $De_0(a)=ae_0(a)$. This means $(D-c)e_n(a)=e_{n-1}(a)+(a-c)e_n(a)$ for $n\in\mathbf{N}$ and $(D-c)e_0(a)=(a-c)e_0(a)$.
Thus, \begin{equation} \{e_0(a_1),\ldots,e_{k_1-1}(a_1),\ldots,e_0(a_m),\ldots,e_{k_m-1}(a_m)\} \end{equation} is a basis of the operator in equation $(1)$.
$^1$ $a_0f^{(0)}+...+a_nf^{(n)}=0$ is equivalent to \begin{equation} f^{(n)}=\frac{-a_0f^{(0)}\ldots-a_{n-1}f^{(n-1)}}{a_n} \end{equation} and that is equivalent to \begin{equation} f^{(m)}=\frac{-a_0f^{(m-n)}\ldots-a_{n-1}f^{(m-1)}}{a_n} \end{equation} for all $n\leq m\in\mathbf{N}$ (you can prove this using induction).