The real Alice's parents didn't consent. Nor did the real Annabel Lee's parents.
Annabel Lee's parents went so far as to hide the girl's grave after she died of typhoid. (Or something... I forget, exactly.) Poe wrote the poem "Annabel Lee" to taunt the girl's parents after he found out the location of the grave in Charleston, SC.
As mentioned, we also have Carroll's letters "begging" for permission to see Alice again.
Back in the day, this was considered scandalous but not illegal unless a person violated the parent's wishes.
Today, both Poe and Carroll would probably have to register as sex offenders.