Miserere, the (2nd person) singular imperative of the deponent verb misereor, misereri, misertus sum takes either the accusative or the genitive.
It is used with the accusative when it is taking a direct object:
miserere me, pity me! miseretur te, he pities you.
It is used with the genitive when it is taking an indirect object - not in the genitive of posession, but as far as I can see it must be the genitive of verbs of remembering and forgetting:
miserere mei, show/have pity for me (like meminit mei, he is mindful of me i.e. he remembers me).
misereor may be pity, have mercy etc and there is practically no difference between miserere me and miserere mei, and any subtlety is lost in translation because translating it as mercy, as we would want to do in prayers etc, means that both would come into english as ‘have mercy on me’.