Hello Vasu,
When a child is born in Spain to foreign parents, he/she is not entitled for the Spanish Nationality right away.
The baby will have the same status as his/her parents and the same duration; in this case a relative of student visa status, that does not involve residency and cannot lead to the Spanish nationality after one year of legal residence. If your wife is able to shift to a residence permit, and gets a resident´s status, you will be able to apply for the baby´s Spanish Nationality once he has completed one year of legal residency.
Regards,
Bookmarks