At first read, the answer would be Yes, this list has a background in earlier Scripture. But there are issues with this answer. Consider two examples:
The Old Testament high priest had to wear a breastpiece consisting of twelve precious stones (Exodus 28:17–20). The illusion, however, is weak.
A breastpiece and a foundation are very different entities.
Four of the stones mentioned in Revelation 21:1–27 do not appear in Exodus 28:3. The order in which the eight overlapping stones are listed differs greatly in the two texts.
Old Testament prophets mentioned precious stones (for example, Isaiah 54:11–12). Of notable interest is Ezekiel 28:13 where the king of Tyre is pictured as living
in Eden, the garden of God
(a reference to the beauty and luxury of the city of Tyre) and dressed in numerous precious stones (the text mentions nine; some in that list reappear in Revelation 21:1–27). But the point of Ezekiel 28 was that the Lord cast that arrogant king down and destroyed him (Ezekiel 28:16–19). That same concept recurred with proud Babylon (Revelation 17:4; Revelation 18:16); all her jewels and other wealth came to nothing (Revelation 18:11–13). In contrast to what became of man-built Babylon, God-filled Jerusalem will survive in infinite glory.
It would seem best to read this list as a contrast to the destruction foretold concerning Babylon in Revelation 17:1 – 18:24. The Bride of Jesus Christ, the church, is ultimately more glorious than the richest and most culturally advanced city (or civilization) humanity can produce. For the Bride is the dwelling place of the Lord himself.
19 The foundations of the wall of the city were adorned with every kind of jewel. The first was jasper, the second sapphire, the third agate, the fourth emerald,