It is not a mortal sin, but it could be an omission. I would not consider this a mortal sin. But in this case, I think your duty is, of course, to advise the parents about this grave error and abuse that they are doing with the child. And then you cannot do more than when you have given advice. You did your duty; and then of course, pray for your niece – that God may touch her and illuminate her that she will grow above this error and save her soul.
I think that when you pray instantly for her continuously, it will be sufficient. Of course, you can do penance, but I think this is up to your decision. You are not obliged under mortal sin to do penance. It depends on your health conditions, but by praying, you can always do it sufficiently. When your physical and psychological situation can do an act of penance for her, then of course it would still be more important. When you feel this appeal to do penance, you can do this, but I think you are not under the obligation of mortal sin.
Dear visitors of Gloria Dei and all who have already written or who will write a personal message to me. I am grateful for your attention, your kindness, for your spiritual support and especially for your sacrifices and prayers for me. God may reward you!