D said she was in the classroom... and Kumoko has been traped thinking she was another student, we've had that idea too... but a spider too ! And Kumoko does not seem to even remember her past name.
Is it possible that for a reason Kumoko is partly D and that tiny spider in the room was used by D to escape certain death but she had to sacrifice some parts of her transfered to Kumoko ?
So Kumoko is coming partly from that spider and another part from D ?