Shelob was born in the First Age, and already lived in the mountains surrounding Mordor "Long before Sauron claimed Mordor as his own and started to build Barad-dûr around S.A. 1000".
"Sauron knew that Shelob lived in her lair, but allowed her to dwell there, because she was an excellent guard of the pass ofCirith Ungol that led to Mordor and because he could spare the Orcs that she occasionally caught. He even sometimes had prisoners driven to her hole and ordered to report to him how she played with them and referred to her as his cat."
Her appearance could be Sauron meeting her for the first time, or Isildur could meet her when he presumably pulls himself out of the wreckage he was buried in and leaves Mordor. Of all the various possible cameos or references they have/could put in this show, Shelob is one of the easiest to do that completely works with the era and doesn't contradict anything.