We represent a polynomial of the form $f(x) = c_0 + c_1 x + \cdots + c_n x^n$ by the $n+1$ dimensional vector $(c_0,c_1,\cdots,c_n)^T$ and we first wish to find an $(n+1)\times(n+1)$-dimensional matrix $M$ to represent the differentiation operator $D$. Observing that $f'(x) = c_1 + 2 c_2 x + \cdots + n c_n x^{n-1}$, we can represent $f(x)$ by
$$D ((c_0,c_1,\cdots,c_n)^T) = (c_1,2c_2,\cdots,n c_n,0)^T$$
And we can check that the matrix corresponding to this linear transformation has the form $$M = \begin{pmatrix} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 &\cdots & 0 & n \\ 0 & 0& \cdots & 0 & 0 \end{pmatrix} $$
(i.e. we have $1,2,\cdots,n$ on the superdiagonal of the matrix). We see that the transpose of this matrix is $$M^T = \begin{pmatrix} 0 & 0 & \cdots & 0 & 0 \\ 1 & 0 & \cdots & 0 & 0 \\ 0 & 2 & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & n & 0 \end{pmatrix} $$
and then we can see by inspection that any vector of the form $(0,\cdots,0,a)$ will be in the nullspace of $M^T$, so any vector of that form will give us the desired basis (we know that the nullspace of our $(n+1)\times(n+1)$-dimensional matrix will be 1-dimensional because our matrix has rank $n$).
In terms of polynomials of degree $n$, it is polynomials of the form $g(x) = c_n x^n$ which form the nullspace of the transpose of the differentiation operator.
Invertibility of $I-D^2$ is the same as saying that $1$ is not an eigenvalue of $D^2$.
Suppose $D^2p=p$. Then $p=0$, otherwise the degree of $D^2p$ is strictly less than the degree of $p$.
Technical note: the degree of the zero polynomial is usually taken to be $-\infty$ so as to preserve the properties
$$
\deg(p+q)\le\max\{\deg(p),\deg(q)\},
\qquad
\deg(pq)=\deg(p)+\deg(q)
$$
with the obvious definition $-\infty+n=-\infty$ for every $n$ (finite or $-\infty$).
In my lecture notes I define $P_n$ to be the vector space consisting of polynomials of degree $<n$ (so including the zero polynomial). This way $P_0$ is the trivial vector space and, in general $P_n$ has dimension $n$. But that's not really a problem with your notation. Just remember that your $P_n$ has dimension $n+1$ (for $n\ge0$, of course).
An example with $n=3$ (your notation). If we consider the standard basis $\{1,x,x^2,x^3\}$, then $D^2(1)=0$, $D^2(x)=0$, $D^2(x^2)=2$, $D^2(x^3)=6x$. Hence the matrix of $I-D^2$ is
$$
\begin{bmatrix}
1 & 0 & -2 & 0 \\
0 & 1 & 0 & -6 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}
$$
and the inverse is
$$
\begin{bmatrix}
1 & 0 & 2 & 0 \\
0 & 1 & 0 & 6 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}
$$
The general formula is
$$
(I-D^2)^{-1}=I+D^2+D^4+\dots+D^{2k}
$$
where $2k\ge n$.
Best Answer
Nothing you said was wrong. Differentiation is a linear operator that transforms (one-variable) polynomial of degree at most $n$ into polynomial of degree at most $n-1$. Since a polynomial of degree at most $n-1$ is also a polynomial of degree at most $n$, you can say that this set is invariant under the differential operator.
If the dimension is your problem, remember that not every linear map is onto, in fact the differentiation is a singular operator on the space of polinomial, since $\frac{d}{dx}1=0$