The encyclopedic Nit'ei Gavri'el (Avelus vol. 2) says that there is no difference in quality between various instances of kadish - be they recited during t'fila, after recitation of T'hilim, or otherwise (44:26). That said, it contains detailed discussions of particular ones, and to what extent they are to be said by a mourner as opposed to someone else. The following are written with respect to mourners.
[If one] entered the shul when the group had finished - even though one has not said Alenu - one can say kadish [yasom after Alenu]. (44:16)
It sounds to me like this means the late enterer was literally not there for any of t'fila. The footnote implies likewise by citing a conflicting opinion that one may not say kadish unless he had overlapped for [at least] a single pasuk.
But it also says 5 paragraphs later that
a mourner who'd davened at the earlier minyan and is in the shul, it is not appropriate for him to say kadish again, unless [people] are likely to suspect his lack of respect for his [deceased] parent.
This is attributed to Riv'vos Efrayim, which in turn cites Igros Moshe. In this case the person was still around, as opposed to the first case where they had just shown up and presumably hadn't yet said kadish at all.
Regarding kadish d'rabanan there seems to be more of an assumption of the reciter's participation in the d'rasha/talmud/Torah than that for t'fila, as far as your initial question. I didn't see it address the makdish-was-absent-for-learning case (may have missed it). I speculate that the underlying idea is that kadish d'rabanan is intended to juxtapose kidush Hashem with Torah as a public service, and as such, it is often said by a more inclusive set of people than other instances of kadish - e.g. sh'lichei tzibur, mourners, or m'say'mim, but specifically those who did the act in question.
It also mentions that the child doing mitzvos should have the same or greater effect on the n'shama of the parent than saying kadish.