If $f$ is a polynomial, how does $f(\frac{d}{dt})$ act on $y$? If $f\left(\frac{d}{dt}\right)=a_n\frac{d^n}{dt^n}+\dots+a_1\frac{d}{dt}+a_0$, then whether
$$f\left(\frac{d}{dt}\right)(y)=a_n\frac{d^n}{dt^n}y+\dots+a_1\frac{d}{dt}y+a_0y$$
or
$$f\left(\frac{d}{dt}\right)(y)=a_n\frac{d^n}{dt^n}y+\dots+a_1\frac{d}{dt}y+a_0$$
I am confused.

Writing $D_t$ for $\frac{d}{dt}$, we can see that $D_t$ is nothing more than an operator on functions (or variables, according to your choice of framework for real analysis). In general any operator $X$ can be iterated, and we write $X^n$ for the $n$-th iterate of $X$. $X^0$ is the $0$-th iterate of $X$, which is naturally the identity on the input domain of $X$.
Thus ${D_t}^0$ is the identity on (real) functions, and so ${D_t}^0(y) = y$ for any real function $y$.
As for polynomials applied to $D_t$... First define, for any real $c$ and operator $X$ on real functions and real function $v$, that $(c·X)(v) := c·X(v)$ where the latter is the scalar multiplication of $c$ with the function $X(v)$. Next define, for any operators $X,Y$ on real functions and real function $v$, that $(X+Y)(v) = X(v) + Y(v)$, where the latter is the pointwise sum of the real functions $X(v)$ and $Y(v)$. We can then verify that reals act via $·$ on operators on real functions, i.e. $(c+d)·X = c·X+d·X$ and $(cd)·X = c·(d·X)$ for any reals $c,d$ and operator $X$ on real functions.
Here are the identity chains in the verification:


*

*$((c+d)·X)(y) = (c+d)·X(y) = c·X(y) + d·X(y) = (c·X)(y) + (d·X)(y)$.

*$((cd)·X)(y) = (cd)·X(y) = c·(d·X(y)) = c·((d·X)(y)) = (c·(d·X))(y)$.
Without this reasoning, it is technically wrong to just claim willy nilly that one can apply a polynomial to $D_t$.
In general this shows that, given any set $S$ and a set $C$ that acts via $·$ on operators on $S$, it is meaningful to apply any polynomial over $C$ to any operator on $S$.
