An 11 year old in the 19th century was far less sheltered from biology than the suburban 11 year old of today.
In fact, there was not a big “sit the kid down and tell them the facts of life” session. Think of the marriage customs of the time, unless you were wealthy, homes did not have vast numbers of bedrooms with soundproof walls, kids knew what intercourse was.
Reproduction and sex was not hidden. Pets were not a fixed tabby cat from the rescue, one had a barn cat that would have a litter of kittens. Chickens, cows, sheep, even in town animals were everywhere doing what animals do. Thus, the 11 year old knew what her attacker wanted, and she knew that it was wrong for him, that he would sin by forcing her.
Maria Goretti was canonized as a martyr. Forgiveness of the martyr’s killers is often demonstrated because those who will die for the Faith have such great love that they are able to forgive even in that terror. Her beatification is because she willingly died to protect moral virtue. http://www.ridolfo.it/goretti/SMG_Pio_XII.html