It took Europe a pretty long time to produce a thinker who would restate the pantheistic ideas that the Upanishads described vividly before the birth of Christ. I wonder if Spinoza had any exposure to Hindu thought.
Not very likely. Spinoza lived in the 1600s, and European knowledge of classical and pre-classical Indian thought didn't really take off until about the late 1700s. On the Upanishads in particular, there was apparently a translation of some of them into Persian in the 1600s, but Spinoza would have had no exposure to that. A translation into Latin came along in the late 1700s.
I'm not sure if Spinoza did or did not have access to Hindu/Buddhist thought but at least Schopenhauer was influenced by the Upanishads. I also think it is reasonable to see connections in some themes in the Upanishads to the transcendental idealism of Kant.
espinoza didn't have access to them directly (he didn't speak sanskrit, and as far as we know nobody had yet translated them into any of the four languages he did speak) but of course the upanishads have influenced western thought indirectly since before classical times. the upanishads deeply shaping the worldviews of the gymnosophists and later of the romani people and, to a smaller extent, the medieval european philosophers whose learning derived from the islamic golden age. khayyam, who brought us a new conception of numbers, at least outwardly endorsed sufism, which has profound and well-known connections with vedic doctrines: https://en.wikipedia.org/wiki/Hindu%E2%80%93Islamic_relation...
i'm not claiming that the flow of ideas was one-way, and because much of it happened before written history (which began rather late in india) or otherwise outside the written record (consider consultations with romani fortune-tellers today, and try to extrapolate to centuries before gutenberg) it's difficult to tell which direction each idea flowed. but clearly there was an enormous amount of philosophical interchange, and at least some of it
however, espinoza's ideas don't seem to have been especially influenced by the upanishads; if anything, he was going in the opposite direction