Salaam munir rana,
I wish I was well versed enough of the Quran to be able to answer your inquiry; but am not. So instead, with regards to your inquiry, I give you Muhammad Asad's interpertaion of 15:17-18.
Note: his translation of the/those two verses is slightly different than the translation you shared. Below is how he translates the two verses:
15:17
And We have made them secure against every satanic force accursed
(15:18)
so that anyone who seeks to learn [the unknowable] by stealth is pursued by a flame clear to see.
His explanation of those two verses is as followed:
15:17 - The term shaytan ("satan") - derived from the verb shatana ("he was [or "became"] remote") - often
denotes in the Qur'an a force or influence remote from, and opposed to, all that is true and good
(Taj al-'Arus, Raghib): thus, for instance, in 2:14 it is used to describe the evil impulses
(shayatin) within the hearts of "those who are bent on denying the truth". In its widest, abstract
sense it denotes every "satanic force", i.e., every impulsion directed towards ends which are
contrary to valid ethical postulates. In the present context, the phrase "every satanic force
accursed (rajim)"- like the phrase "every rebellious (marid) satanic force" in a similar context
in 37:7 - apparently refers to endeavours, strongly condemned in Islam, to divine the future by
means of astrological speculations: hence the preceding reference to the skies and the stars. The
statement that God has made the heavens "secure" against such satanic forces obviously implies
that He has made it impossible for the latter to obtain, through astrology or what is popularly
described as "occult sciences", any real knowledge of "that which is beyond the reach of human
perception" (al-ghayb).
15:18 - Lit., "excepting [or "except that"] anyone who seeks to hear by stealth...", etc. The implication
seems to be that any attempt at fathoming the mysteries of the unknowable by such illicit means
("by stealth") is inevitably followed by "a flame clear to see", i.e., by burning, self-evident
frustration.
Hope that helps.