To look at a soul's perspective, asking how could there be a contract between a rapist and a victim, is like asking why there are so much suffering in the world.
No one agrees that they would like to be born in poverty, the way no one agrees that they want to get raped.
The "contract" between a rapist and a victim does not mean the victim agree to be taken advantaged of.
Personally I don't believe there is a soulful "contract" involved in the case where pregnancy occur because of rape. But if you assume every life has a purpose, including fetuses, maybe incidences of rape are to teach people about something - but people has the free will to not learn the lesson, such as how to have compassion and respect, which rapists obviously do not have.
On the soul level, life's purpose too often cannot make sense with justice. We can only hope that all people have enough free will to perpetuate justice and love in order to ease suffering.