There is no clear cut anser to this. The reality is far more nuanced. I don't think any one country is heir to the Moghuls. The legacy of Moghuls is diffused over a large geography.
- Uzbekistan
- Afghanistan
- Pakistan
- India
- etc
The Moghuls hailed from Central Asia, had Turkic heritage, used Persian and adopted high Persian culture, relied on Afghan soldiers, Pakistan was staging post
before India was invaded.
Meaning Moguls were in Pakistan before they set foot in India. But later after they conquered the teeming Ganga valley their power base shifted into the Ganga plains and over time became more 'Indian' so in the latter stages the
Muslim bayyas of UP have greater claim.
So we have a moving target that no one country can claim as 'heir'. Had Pakistan kept Farsi and Persian high culture then I think it could have come out as the more significant heir.
But as it is Pakistan's claim is no stronger then the rest of the region.