Short Answer:
If the possibly timeless Prophets know what "will" happen in "the future", they knew where they were going to put the other end of the wormhole even "before" they put it there.
Long Answer:
You assume that the prophets live in the Bajoran wormhole.
But what is known is that the prophets are encountered by some of the many travelers through the wormhole. Sometimes the travelers need or want to contact the Prophets and sometimes the Prophets do contact those travelers.
And when that happens the travelers seem to find themselves somewhere else, out of their ships. And whether they actually leave their ships or that is an illusion is not known.
So either the prophets do live in the wormhole, or else the prophets live somewhere else, but contact some of the travelers through the wormhole.
You can think of the Bajoran Wormhole as analogous to a road which goes straight north and south, and has high walls on either side. There is a least one gate in the sidewalls that leads to a lane going east and west which leads to wherever the prophets live.
Or you can think of the Bajoran Wormhole as a place where conditions are intermediate between the normal universe and wherever the Prophets live. So the prophets may have made the wormhole so that it would be relatively easy to send their equivalent of spaceprobes into it with communications systems so they could communicate with travelers through the wormhole.
So I think that it is really oversimplified thinking, both scienficially and theologically, to jump to the conclusion that the Bajoran wormhole is the same thing as the Celestial Temple of Bajoran theology, instead of the outmost courtyard of the Celestial Temple, or the road that the road to the Celestial Temple starts from.
As for the Prophets being "of Bajor", that seems to be a logical contradiction to their not knowing about linear time. It is possible that they knew more about linear time than they said at first to avoid overwelming Sisko with too many revelations and demands at one time.
If the Prophets can see many different times at once, or maybe live in different times at once, or maybe travel in time, they may know vastly more about the past and the destiny of Bajor than anyone else does.
It is possible that the Prophets came into existance on Bajor thousands or millions or billions of years ago, or will come into existance on Bajor thousands or millions or billions of years in the future.
And possibly the Prophets came into existance by some natural process, and possibly they were created as a leap foreward to ahighe for of existance by a highly advanced civilzation.
That hypothetical highly advanced civilization might have been a previous civilization of Bajorans which fell tens or hundreds of thousands of years ago, long before the present Bajoran civilizatin began. Or it might have been a highly advanced civilization of Bajorans long in the future.
Or possibly the Prophets were created by a highly advanced civilization of a pre-Bajoran intelligent species on Bajor millions or billions of years ago.
Or maybe they will be created by a highly advanced civilization of a post-Bajoran intelligent species on Bajor millions or billions of years in the future.
Or possibly the Prophets will travel from billions of years in the future to billions of years in the past to create themselves.
Anyway, those are a few ideas about how the Prophets could be so strange and alien and not know much about linear time and yet still be "of Bajor".
And considering how timeless the Prophets might be, and how much they might know about events which can be considered to be future events from other points of view, possibly they put the Gamma Quadrant end of the Wormhole where they did because they knew they were destined to do so.
And here is a bit of speculation.
I remember that in the second seasons (1989-1990) of War of the Worlds the alien invaders, Morthren from planet Morthrai, worship the Eternal, who looked sort of like a glowing octopus floating in the air.
At least hundeds of Morthren come to Earth in the first episode of the second season. The series finale, "The Obelisk", opens with a statement that there are just 40 Morthren left on Earth. A flashback in the episode claims that their home planet became uninhabitable as a result of the efforts to send expeditions to Earth, and 5 more Morthern are killed in the episode. So at the end, the 35 surviving Morthren make peace with the humans and seek to make a better world.
So the Morthren living on the planet Morthrai have certainly suffered a vast disaster, becoming extinct except for 35 living on the alien planet Earth. Perhaps the pitifully few Morthren living on Earth will quickly die out or be exterminated by humans. Or maybe they will survive and form a mixed human-Morthren civilization on Earth.
And maybe the hypothetical human-Morthren civilization might someday create a super advanced being, the Eternal. And maybe the Eternal will travel back in time to ancient Morthrai and become the god of the Morthren and guide their civilization. And maybe its guidence with creat much benifit for theMorthren,a nd prevent many disasters, but will have the ultimate goal of leading them into the disasters of their expediitons to Earth, and thus the rise of the mixed human-MOrthren civilization which will create it.
It seems a bit odd that even though Morthern leaders can consult the Eternal for advice and instructions, their actions led to such almost total disaster for the Morthern of that era. It almost seems like the Eternal led the Morthen into disaster in order to create a better future from the Eternal's point of view.
I once read that Emperor Maximilian I (r. 1493-1519) called Emperor Charles IV (r. 1346-1378) a father to his kingdom of Bohemia, but a stepfather to the Empire. And possibly the Eternal was a father to the hypothetical future civilziazath which might create it, and a stepfather to the Morthren of the era of War of the Worlds (1988-1990).
And the thought has occurred ot me that the Prophets might possibly be the same sort of gods to the Bajorans as the Eternal might be to the Morthren.
So I can imagine a sequel to DS9 where the Prophets warn the Bajorans to prepare warp capable generation ships capable of travelling hundreds of thousands of light years non stop. And many Bajorans heed the warning.
Then it is revealled somehow, that Garek and Sisko conspired to manipulate trick the Romulans into fighting the Dominion, resulting in countless millions of Romulan deaths. The Romulans force the Cardassians to hand over Garek for torture, execution, and trial.
Then Sisko returns to Bajor. The Bajorans try to keep it secret, but the Romumans hear about it and demand Sisko's extradition. The Bajorans refuse, right before they a scheduled to join the Federation, and the Federation cancels the admission of Bajor, since the Bajorans refuse to honor their committment to not get the Federation involvedin unnecessary wars.
The Romulans smash the Bajoran defense force and exterminate all life on Bajor and the Bajoran colonies. Only the Bajorans who heeded the warnings escape in a "rag-tag fugitive fleet" of space arks, pursued by a Romulan fleet. And Romulans destroy the Bajoran Wormhole, hoping to kill the Prophets, since they also assume the Prophets live in the wormhole, and hoping to prevent any further invasions by the Dominion.
But maybe it turns out that some survivors from the "rag-tag fugitive fleet" of space arks will found a civilization in the Greater Magellanic Cloud or somewhere,
and after thousands or millions of years that civilization will create the Prophets.
Thus the Prophets might be gods of that hypothetical future civilization, and "stepgods" of the Bajorans living on Bajor.