The Bible contains literal parts as well as symbolic ones. How we can distinguish between them?
There are a number of aspects that help us to settle doubts of these.
In the case in question (Isa 45:3) we have two powerful tools to utilize: (1) the peculiar poetic structure of the verse, and (2) the history accounts.
Let’s start with the Point One.
It’s easy to detect here the poetic structure of synonymous parallelism, “in which the same or similar thoughts are repeated” (a).
In other words, if you like a math style, אוצרות (treasures) is to חשׁך (darkness) as (ו) מטמני (wealth) is to מסתרים (hiding places).
In fact, we have – in MT (devoid of diacritical marks) - this structure (I’ve arranged the terms positioning so the correspondence between semantic-similar words could be graphically more evident):
אוצרות חשׁך
ו
מטמני מסתרים
darkness (of) treasures*
and
places hiding (of) wealth
“treasures of darkness and wealth of hiding places”
[*properly, ‘what is kept under surveillance to be protected by eyes of stranger people’]
To leap at us the terms in parallelism: treasures & wealth, as well as, darkness & hiding places.
It is clear here that Isaiah speaks about of some material treasures & wealth, as well as, material darkness & hiding places (to conceal them). It seems to me we have no clues to define them differently (spiritual treasures or darkness).
For a comparison, we may well remember the Hezekiah’s oppositely-managed treasures mentioned in 2 Kings 20:12-17 (NDKJV):
“At that time Berodachbaladan, the son of Baladan, king of Babylon, sent letters and a present unto Hezekiah: for he had heard that Hezekiah had been sick. And Hezekiah hearkened unto them, and shewed them all the house of his precious things, the silver, and the gold, and the spices, and the precious ointment, and all the house of his armour, and all that was found in his treasures: there was nothing in his house, nor in all his dominion, that Hezekiah shewed them not. Then came Isaiah the prophet unto king Hezekiah, and said unto him, What said these men? and from whence came they unto thee? And Hezekiah said, They are come from a far country, even from Babylon. And he said, What have they seen in thine house? And Hezekiah answered, All the things that are in mine house have they seen: there is nothing among my treasures that I have not shewed them. And Isaiah said unto Hezekiah, Hear the word of Jehovah. Behold, the days come, that all that is in thine house, and that which thy fathers have laid up in store unto this day, shall be carried into Babylon: nothing shall be left, saith Jehovah.”
Interestingly, this treasure that Hezekiah - inadvertently showed to Babylonians was the almost the same they did grasp from the Jerusalem's fall booty. Through a kind of talion, God drove Cyrus to conquer Babylon and gave him the treasure that Babylonians accurately concealed!
As regards the Point Two, Have we some historical clues to conclude that the treasures/wealth mentioned in Isaiah (45:3) were stored into some hiding places before Cyrus discovered them [bold is mine]?
“And I will give thee treasures of darkness, and hidden riches of secret places,… What had been laid up in private places, and had not seen the light for many years. The Jewish Rabbins say [Vide Abendana in Miclol Yophi in Ioc.], that Nebuchadnezzar having amassed together all the riches of the world, when he drew near his end, considered with himself to whom he should leave it; and being unwilling to leave it to Evilmerodach, he ordered ships of brass to be built, and filled them with it, and dug a place in Euphrates, and hid them in it, and turned the river upon them; and that day that Cyrus ordered the temple to be built, the Lord revealed them to him: the riches of Croesus king of Lydia, taken by Cyrus, are meant; especially what he found in Babylon, which abounded in riches, Jer 51:13. Pliny [Nat. Hist. l. 33. c. 3.] says, when he [Cyrus] conquered Asia, he brought away thirty four thousand pounds of gold, besides golden vessels, and five hundred thousand talents of silver, and the cup of Semiramis, which weighed fifteen talents. Xenophon [Cyropaedia, l. 3. c. 3. l. 5. c. 4. l. 7. c. 14.] makes mention of great riches and treasures which Cyrus received from Armenius, Gobryas, and Croesus.” (b)
“treasures of darkness — that is, hidden in subterranean places; a common Oriental practice. Sorcerers pretended to be able to show where such treasures were to be found; in opposition to their pretensions, God says, He will really give hidden treasures to Cyrus (Jer 50:37; Jer 51:13). Pliny (Natural History, 33:3) says that Cyrus obtained from the conquest of Asia thirty-four thousand pounds weight of gold, besides golden vases, and five hundred thousand talents of silver, and the goblet of Semiramis, weighing fifteen talents.” (c)
“The treasures which Cyrus obtained in his conquests are known to have been immense. Sardis, the capital of Croesus, king of Lydia, the most wealthy monarch of his time, was, according to Herodotus (i. 84), given up to be plundered; and his hoarded wealth became the spoil of the victor (see also Xen. Cyr. vii). That Babylon abounded in treasures is expressly declared by Jeremiah Jer 51:13 : ‘O thou that dwellest upon many waters, abundant in treasures.’ These treasures also, according to Jeremiah Jer 50:37, became the spoil of the conqueror of the city. Pliny also has given a description of the wealth which Cyrus obtained in his conquests, which strikingly confirms what Isaiah here declares: ‘Cyrus, in the conquest of Asia, obtained thirty-four thousand pounds weight of gold, besides golden vases, and gold that was made with leaves, and the palm-tree, and the vine. In which victory also he obtained five hundred thousand talents of silver, and the goblet of Semiramis, which weighed fifteen talents.’ (Nat. Hist. 33. 3.) Brerewood has estimated that this gold and silver amounted to one hundred and twenty-six million, and two hundred and twenty-four thousand pounds sterling. (De Pon. et Men. 10.) Babylon was the center of an immense traffic that was carried on between the eastern parts of Asia and the western parts of Asia and Europe. For a description of this commerce, see an article in the Bib. Rep. vol. vii. pp. 364-390. Babylonian garments, it will be remembered, of great value, had made their way to Palestine in the time of Joshua Jos 7:21. […] Great quantities of gold were used in Babylon. The vast image of gold erected by Nebuchadnezzar in the plain of Dura is proof enough of this fact. The image was sixty cubits high and six broad Dan 3:1. Herodotus (i. 183) informs us that the Chaldeans used a thousand talents of frankincense annually in the temple of Jupiter.” (d)
In a similar way, see also Joseph Benson (Commentary on the Old and New Testament), and Adam Clark (Commentary on the Bible).
In the recent TaNaKh's translation (with commentary) by Robert Alter we read this footnotes (on Isa 45:3, bold is mine):
"The darkness here is pragmatic, not symbolic - the treasures have been hidden or buried in deep dark places, but now they will be brought to light to be appropriated by the conquering Cyrus."
I hope these data answer your question.
References:
a) https://www.biblegateway.com/resources/asbury-bible-commentary/Major-Characteristics-Hebrew.
b) John Gill’s Exposition of the Bible (ad locum).
c) Jamieson, Fausset, and Brown’s Commentary.
d) Albert Barnes’ Notes on the Bible.