It could be a reference to the classical nursery rhyme Little Miss Muffet:
> Little Miss Muffet
> Sat on a tuffet,
> Eating her curds and whey;
> Along came a spider,
> Who sat down beside her,
> And frightened Miss Muffet away.
This was what immediately came to my mind on seeing "spider", "beside", and "frightened" in the same sentence. It's a fairly well-known children's poem, I think (at least in the UK - not sure about the US where Philip K. Dick grew up).
As for whether the spider's supposed to be familiar with literature ... I suspect we aren't supposed to overthink this one. It's a short story, and spiders are depicted as intelligent sentient beings, part of a great war between species. Making a spider character refer to literature helps to emphasise that effect, if you can suspend your disbelief enough not to wonder why spiders would (or could) read human poetry.