All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If there is an authority to take care of this baby girl and protect her from being harmed, then it is permissible for you to request that you renounce her custody and it does not matter if this matter will cause embarrassment to the family of your ex-wife.
The jurists stated that taking care of a foundling is a communal obligation. Khaleel said in his book “Al-Mukhtasar” on the Maaliki Fiqh: “Taking a foundling is a communal obligation.”
‘Ulaysh said in his book entitled “Minah Al-Jaleel”, commenting on Khaleel’s provious statement: “Protecting the human soul is a communal obligation if someone does it on behalf of others as by doing so, one protects the soul. One is not obliged to take an adult or a child who is not deserted; one knows whether or not the child is deserted through accompanying circumstantial evidence.” Moreover, Ibn Shaas said: “Every foundling who does not have a caretaker, then taking him is among the communal obligations.”
Besides, Mataalib ‘Uli An-Nuha, which is a Hanbali book, reads: “Taking a foundling is Islamically a communal obligation as Allaah Says (what means): {Help you one another in virtue, righteousness and piety but do not help one another in sin and transgression.} [Quran 5:2]” The same book also reads: “The (Muslim) ruler may take him from the person who took him (i.e. if he is untrustworthy), and hand him over to another trustworthy person to nurture him.”
Therefore, if you fear that your ex-wife will be negligent about nurturing this baby girl, then you may take the case to an Islamic judge to look into the matter.
Allaah Knows best.