This information is gleaned from talking to friends that are Peruvians, in Spain, who obtained resident status.
The key is your wife. Citizens from former Spanish colonies have an advantage in getting permits.
The fact she is studying for an advance degree will work in her favor as well.
You are going to have to spend some money talking to a Spanish immagration lawyer to find out the best way to facilitate this. It will be money well spent if you are serious about living in Spain.
Your wife may have to stay in the country while the resident permit is processed.
Once she has resident status, they have to give it to you and your daughter although this too will take time.
This assumes everyone involved has no crimnal record.
_________________________
Been there, done that-
Old Gringo