All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
First of all, we would like to draw your attention to the fact that tracing this girl back to you is not permissible; this is the form of adoption which Islam has forbidden.
Allah says (what means): {And He has not made your claimed [i.e. adopted] sons your [true] sons. That is [merely] your saying by your mouths, but Allah says the truth, and He guides to the [right] way. Call them by [the names of] their fathers; it is more just in the sight of Allah.} [Quran 33:4-5] For more benefit, please refer to fatwa 82371.
Therefore, if you have done so while knowing that it is prohibited, then you have to repent to Allah. Please refer to fatwa 86527 for the conditions of repentance.
If you married the mother of that girl through a valid marriage, even according to one scholarly view, then you are considered a Mahram (permanently unmarriageable) to her. However, if the marriage was invalid, then you have not become a Mahram to her by that.
Ibn Qudaamah said:
“Sexual intercourse is of three kinds:
1- Permissible, which is having sexual intercourse in a valid marriage or with a slave girl whom the man possesses. This type of intercourse leads to prohibition of marriage (with the woman's female ascendants and descendants) according to the consensus of the scholars, and the man is considered a Mahram to any female who became prohibited for him to marry because of having intercourse with that woman because she has become prohibited for him for a valid reason. This resembles the status of a Mahram resulting from blood relations.
2- Sexual intercourse in a doubtful marriage [when the man believes that the marriage is lawful], which is sexual intercourse in an invalid marriage, or having sexual intercourse with a woman whom he wrongly thought was his wife or his slave girl, or having sexual intercourse with a slave girl who is co-owned by him and others; and the like. The prohibition of marrying the woman's female ascendants and descendants applies in this relationship just as it applies to lawful sexual intercourse according to the consensus of the scholars … but the man does not become a Mahram for them and he is not permitted to look at them, because the sexual intercourse (with the woman of whom those women are female ascendants and descendants) was not valid, and because being a Mahram for a woman is related to being definitely prohibited from having sexual intercourse with her.”
However, your wife has the right to refuse that the girl lives with her because your wife has the right to be in a separate dwelling, as has been clarified by the jurists (scholars of Fiqh). Khaleel, from the Maaliki School of Fiqh, said in his Mukhtasar, “She [the wife] has the right to refuse to live with his [her husband’s] relatives.”
Nevertheless, your wife has no right to prevent you from taking care of that girl if you wish to be kind to her.
Allah knows best.