I thought it might be instructive to present an alternative approach. Using the binomial theorem, we can write
$$(1-x)^n=\sum_{k=0}^n\binom{n}{k}(-1)^{k}x^k\tag 1$$
Differentiating $(1)$ with respect to $x$ and multiplying the result by $x$ yields
$$\begin{align}
x\frac{d}{dx}\left((1-x)^n\right)&=-nx(1-x)^{n-1}\tag2\\\\
&=\sum_{k=0}^n\binom{n}{k}(-1)^{k}kx^k \tag3
\end{align}$$
Setting $x=1$ in $(2)$ and $(3)$ reveals
$$\sum_{k=0}^n\binom{n}{k}(-1)^{k}k=0$$
provided $n>1$. And if $n=1$, then we find that $\sum_{k=0}^1\binom{1}{k}(-1)^kk^1=1$.
We can repeat this process to obtain
$$\left.\left(\left(x\frac{d}{dx}\right)^m (1-x)^n\right)\right|_{x=1}=\sum_{k=0}^n\binom{n}{k}(-1)^{k}k^m \tag 4$$
So, the problem boils down to showing that the left-hand side of $(4)$ is $0$ for $m<n$ and $(-1)^n\,n!$ for $n=m$. To do so, we use induction.
We claim that we can write
$$\left(x\frac{d}{dx}\right)^m (1-x)^n=\sum_{\ell=1}^m p_\ell(x)(1-x)^{n-\ell} \tag {5a}$$
where $p_\ell(x)$ is a polynomial of order $\ell$ with
$$p_m(x)=(-1)^m m!\binom{n}{m}x^m \tag {5b}$$
Proving $(5)$ by induction
From $(1)$, we see that a base case to prove $(5)$ inductively is established. Then, assuming $(5)$ is true for some $m>1$, we have
$$\begin{align}
\left(x\frac{d}{dx}\right)^{m+1}(1-x)^{n+1}&=x\frac{d}{dx}\sum_{\ell=1}^m p_\ell(x)(1-x)^{n-\ell}\\\\
&=\sum_{\ell=1}^m \left(xp_\ell'(x)(1-x)^{n-\ell}-(n-\ell)xp_\ell(x)(1-x)^{n-\ell-1}\right)\\\\
&=\sum_{\ell=1}^{m+1} q_\ell(x)(1-x)^{n-\ell}
\end{align}$$
where the terms $q_\ell(x)$ are given by
$$q_\ell(x)=\begin{cases}xp_\ell'(x)&,\ell=1\\\\
xp_\ell'(x)-(n-\ell+1)xp_{\ell-1}(x)&,1<\ell\le m\\\\
-(n-m)xp_{m}(x)&,\ell=m+1
\end{cases}$$
Furthermore, we see that
$$\begin{align}
q_{m+1}(x)&=(-1)(n-m)xp_m(x)\\\\
&=(-1)^{m+1}(n-m)m!\binom{n}{m}\\\\
&=(-1)^{m+1}(m+1)!\binom{n}{m+1}
\end{align}$$
And we have proven inductively that the relationships in $(5)$ hold.
Finally, using $(5)$ in $(4) yields
$$\sum_{k=0}^n\binom{n}{k}(-1)^{k}k^m =\begin{cases}0,n>m\\\\(-1)^n\,n!&,n=m\end{cases}$$