Who is responsible for that?
According to Islam (Shia Islam), in such case, the father is responsible for maintaining (giving alimony and ...) the child(ren) if a wife gets pregnant in Nikah Mut'ah.
From the Islamic viewpoint, he or she (the child) will be recognized as their kids and they'll be regarded as his or her lawful father and mother, therefore the child’s nafaqah/sustenance will be the duty of the father and actually the child will inherit from both his mother/father.
As a result the child will never feel ashamed/humiliated; because
his/her mother and father have obeyed Allah by being in a relationship
validated both by Islam and law instead of committing anything against
the shariah (Islamic law). However we should be aware that the
responsibility for taking care of the child is not only given to the
father in temporary marriage but also in permanent marriage. In both
cases, it is the mother’s right to take care of the child, for two
years if it were a boy, and seven years if it were a girl, which
she can give up to the father or use, but after that certain period
this right will be passed on to the father...
To read the complete text, refer to: