If you partition $n$ into exactly $k$ distinct parts, then the $i$-th smallest part must be at least $i$, therefore strictly larger than $i-1$. So you can start reserving $i-1$ units for the $i$-th smallest part, which amount to a total of $\binom k2$ reserved units. Then (assuming $n\geq\binom{k+1}2$ without which no solution is of course possible) you can find a partition of $n-\binom k2$ into exactly $k$ parts, and then add the $i-1$ reserved units to the $i$-th smallest part of that partition (it may be ex-aequo with another part, but after these additions it will be distinct from any other parts, and exactly $i$-th smallest among them). This gives every partition of $n$ into exactly $k$ distinct parts exactly once.
The reason for not reserving $i$ parts is than you would then need a partition of $n-\binom{k+1}2$ into at most $k$ parts, and this case did not occur in the list of cases you said you knew how to handle. But in any case, the number of ways to partition any $m$ into at most $k$ parts is equal to the number of ways to partition $m+k$ into exactly $k$ parts, by a similar argument (reserve one unit for each part).
In the "Update" (the day after the Question itself was posted), the OP mentions a recursion for counting the partitions of $n$ into $k$ distinct parts, each part at most $M$:
$$ p_k(\leq M, \mathcal{D},n) =
p_{k-1}(\leq M-1, \mathcal{D},n-k) +
p_k(\leq M-1, \mathcal{D},n-k) $$
and asks "How can I prove this?".
To see this, separate the required partitions on the basis of whether $1$ appears as a summand. If it does, then subtracting $1$ from each summand produces a partition of $n-k$ with exactly $k-1$ distinct parts (since the original summand $1$ disappears), each part at most $M-1$. These partitions are counted by the first term on the right-hand side of the recursion. Otherwise the summand $1$ does not appear, and subtracting $1$ from each part resulting in a partition of $n-k$ with exactly $k$ distinct parts, each part at most $M-1$. These cases are counted by the second term.
Note that a partition of $n$ with $k$ distinct parts exists if and only if $n \ge \binom{k+1}{2}$, because the ascending summands $m_1 + \ldots + m_k = n$ must satisfy $m_i \ge i$. If $n = \binom{k+1}{2}$, then there is just one such partition with $k$ distinct parts, the largest of which is $k$. Repeated application of the recursion will culminate with terms which we can evaluate "by inspection" as either zero or one.
By itself this recursion doesn't seem to give us an especially attractive way of evaluating $p_k(\leq M, \mathcal{D},n)$. Like the recursion for Fibonacci numbers, as a top-down method it suffers from recalculating terms multiple times (giving exponential complexity), so we would be better off working with it as a bottom-up method (giving polynomial complexity).
Better for large parameters is to close the circle with the ideas presented by @NikosM. by showing how the evaluation of $p_k(\leq M, \mathcal{D},n)$ can be reduced to counting restricted partitions without requiring distinct summands.
Prop. Suppose that $n \gt \binom{k+1}{2}$. Then the following are equal:
$(i)$ the number of partitions of $n$ into exactly $k$ distinct parts, each part at most $M$, i.e. $p_k(\leq M, \mathcal{D},n)$
$(ii)$ the number of partitions of $n - \binom{k}{2}$ into exactly $k$ parts, each part at most $M$
$(iii)$ the number of partitions of $n - \binom{k+1}{2}$ into at most $k$ parts, each part at most $M$
Sketch of proof: Once we know the ordered summands of partitions in $(i)$ satisfy $m_i \ge i$, it is easy to visualize their equivalents in $(ii)$ and $(iii)$ by Young tableaux, also called Ferrers diagrams. We remove a "base triangle" of dots corresponding to the first $i$ dots in the $i$th summand (since $m_i \ge i$) to get case $(iii)$, and remove one fewer dot in each summand to preserve exactly $k$ summands in case $(ii)$. These constructions are reversible, and the counts are equal.
Remark 1 If $n \le \binom{k+1}{2}$, $p_k(\leq M, \mathcal{D},n)=1$ if $n=\binom{k+1}{2}$ and $k \le M$ and otherwise $p_k(\leq M, \mathcal{D},n)=0$.
Remark 2 For fixed $k,n$, suppose $M_0 = n - \binom{k}{2} \gt 0$. Then for all $M \ge M_0$, $p_k(\leq M, \mathcal{D},n) = p_k(\leq M_0, \mathcal{D},n)$. That is, further increasing the upper bound $M$ on the size of parts will not yield additional partitions of $n$ with exactly $k$ distinct parts.
Recommended Reading
Andrews, George E. The Theory of Partitions (Cambridge University Press, 1998)
A modern classic for theory of integer partitions, reviewed by Richard Askey in BAMS.
Best Answer
Consider the generating function $f(x,y,z)=\sum_{nkl}f_{nkl}x^ny^kz^l$, where $f_{nkl}$ is the number of partitions of $n$ into $k$ parts of which $l$ are distinct. This is
\begin{eqnarray} f(x,y,z) &=& \prod_{j=1}^\infty\left(1+z\left(yx^j+\left(yx^j\right)^2+\cdots\right)\right) \\ &=& \prod_{j=1}^\infty\left(1+z\left(\frac1{1-yx^j}-1\right)\right)\;. \end{eqnarray}
Then
\begin{eqnarray} E(n,k) &=& \sum_llf_{nkl} \\ &=& \left[x^ny^k\right]\left.\frac\partial{\partial z}f(x,y,z)\right|_{z=1} \\ &=& \left[x^ny^k\right]\sum_{m=1}^\infty yx^m\prod_{j=1}^\infty\frac1{1-yx^j} \\ &=& \left[x^ny^{k-1}\right]\sum_{m=1}^\infty x^m\prod_{j=1}^\infty\frac1{1-yx^j} \\ &=& \left[x^ny^{k-1}\right]\sum_{m=1}^\infty x^m\sum_{r,s}P(r,s)x^ry^s \\ &=& \left[x^n\right]\sum_{m=1}^\infty x^m\sum_{r=0}^\infty P(r,k-1)x^r \\ &=& \sum_{r=k-1}^{n-1}P(r,k-1)\;. \end{eqnarray}
This implies the recurrence relation
$$ E(n,k)=E(n-1,k)+P(n-1,k-1)\;. $$
This is OEIS sequence A092905, and that entry provides the recurrence relation
$$ E(n,k)=\sum_{j=0}^kE(n-k,j)\;. $$
Note that this implies that $E(k+m,k)$ is independent of $k$ for $k\ge m$, so if you arrange the values of $E(n,k)$ in a triangular array, each diagonal $E(k+m,k)$ is eventually constant.