We can modify the standard recursion satisfied by the Catalan numbers.
First, consider the case $k=2$. A $k=2$ word is either already a Dyck word (which can happen in $D^1_n$ ways), or there's a first place where there are more Ys than Xs. In the latter case, the word looks like $w_1YXw_2$ where $w_1$ is a Dyck word (since we're referring to the first place where Ys overtake Xs) and $w_2$ is any $k=2$ word of the appropriate size (since the Xs and Ys have been evened out before w_2). Thus, $D_{n}^{2}=D_{n}^{1}+\sum_{i=0}^{n-1}D_{i}^{1}D_{n-1-i}^{2}$. Notice that if we define $D_{-1}^{2}=1$, this is really the recursion for the Catalan numbers, with a shift, so that $D_{n}^{2}=D_{n+1}^{1}$, but that fact won't generalize, so we press on.
For $k>2$, either the word is actually a $k-1$ word, or there's a first place where the word gets maximum initial Ys. I had wanted to say "so it begins with a $k-1$ word that is not a $k-2$ word, followed by YX" to get the recursion $D_{n}^{k}=D_{n}^{k-1}+\sum_{i=0}^{n-1}(D_{i}^{k-1}-D_{i}^{k-2})D_{n-1-i}^{k}$ for $k\ge2$ if we follow the convention that $D_{n}^{0}=0$". But that's flawed, because a $k-1$ word ends with enough Xs to cancel out any initial Ys. (Incidentally, for $k=3$ anyway this potentially incorrect sequence seems to be a Catalan transform of the fibonacci numbers as listed on OEIS.)
Edit: Upon thinking things over some more, I found an uglier recursion for $k=3$ manually. As before, either the word is a $k=2$ word (so a count of $D_{n}^{2}$), or it has an initial string with two un-Xed Ys in a row. The first time this happens, it may be a YYXX, so we have $w_1$YYXX$w_2$ where $w_1$ is a $k=2$ word and $w_2$ is a $k=3$ word. However, it may be that the first time this happens we have YYXYXX, or YYXYXYXX, etc. If $i$ is the number of intervening "XY"s, then we can sum over $i$ to get all of the possibilities: $D_{n}^{3}=D_{n}^{2}+\sum_{i=0}^{n-2}\sum_{j=0}^{n-2-i}D_{j}^{2}D_{n-2-i-j}^{3}$. This appears to be the second differences of the Catalan numbers.
The problem is that for $k$ beyond three this gets very hairy very fast, so I'd hope there's a better approach that can get something that works for all k. My bet is that maybe some recursion can be gotten by adding another parameter to allow partial modified Dyck words to be counted, as that's what needs to be done inside of YYYX...X for the $k=4$ case. I don't have any more insight right now.