I would like to have a city sitting on top of a large iron deposit that will be mined by the inhabitants of the city. Is that feasible for them? Won't the city collapse under the mines? Are there some other issues I should be aware of?
There are cities with extensive mining operations below them. The most famous is probably Paris.
Under Paris there are spaces of all kinds: canals and reservoirs, crypts and bank vaults, wine cellars transformed into nightclubs and galleries. Most surprising of all are the carrières—the old limestone quarries that fan out in a deep and intricate web under many neighborhoods, mostly in the southern part of the metropolis... Into the 19th century those caverns and tunnels were mined for building stone.
You can tour the Paris catacombs full of bones, but the tunnels were there before they put the bones there. And there are apparently many more tunnels than are occupied by bones. Kansas City also has extensive limestone quarries beneath it, although of course more recent (and less chaotic) than the ones in Paris.
I found reference to the Kiruna Mine which is a mine underneath a city of 24,000. Wikipedia states that subsidence related to the mine has affected some parts of the city.
If iron is that valuable, sure.
Detroit, Michigan is built on top of some pretty extensive salt mines.
The first image shows the vertical extent of the salt mines:
The second picture shows the horizontal extent of the mines:
All that you really need for a city to live on top of the mine is to have the mine deep enough and/or have enough structure left around the mine so it doesn't collapse (you want that anyway).
Edit with Image to show actual vertical scale:
It's possible, but you almost certainly need steam engines (or some kind of magical steam engine analog). A good real life analog would be Butte, Montana. Butte had a number of mines, primarily owned and operated by the Anaconda mining company. Wikipedia tells me that from 1880 to 2015, 15 million metric tons of ore were extracted from underneath the town. Most of the mines were producing copper ore. It is said of Butte that it's "A mile high and a mile deep" -- the city sits a mile above sea level, and the deepest mines reach a mile down. At its peak, the town had a population of about 40,000. There was quite a bit of labor unrest; Butte was the site of the longest strike in US history, the worst hard rock mining disaster, and was the birthplace of one of the most active and radical labor unions, the Western Federation of Miners.
Something to consider is that large-scale mining is very resource intensive, and requires trade with outside regions. The energy to run the mines and the food to feed the miners probably needs to be imported, and then once the ore is produced, it needs to be shipped off to somewhere that wants ore in the quantities that its being produced in.
The mines will probably be pretty deep if the mining is not going to totally destroy the integrity of the surface. This means hard rock mining, probably for something with an industrial value like copper. Hard rock mining is really slow. Before dynamite, a couple of guys would pound an iron rod into the rock face until a bit cracked off. Progress could be as slow as 0.2 inches a day. Blasting speeds things up immensely, but is dangerous. Pneumatic drills come later, and also speed things up quite a bit.
The deeper the mine goes, the harder and more costly it becomes to keep them running. Once a mine shaft crosses below the water table, it becomes necessary to run pumps around the clock the prevent the mines from filling up with water. Furthermore, fans must be run to circulate fresh, breathable air from the surface down into the shafts where the miners are working. Elevators must be run to move miners down into the mines and to move ore back out. All of this gets harder and harder the further down you go. The costs are fixed costs, so the mines will run 24/7.
Keeping the mines running requires a lot of resources. You need to power the fans, the pumps, and the elevators, and you need to power them all of the time. And you need wood to build supports for the mine -- a lot of wood. In the case of Butte, the need for wood was so great that they were importing mahogany from South America for the supports. Even just producing enough energy requires steam power or its magical equivalent, and either way the fuel must be imported.
All of the ore produced must then be processed and shipped out. In the case of Butte, the Anaconda Company built an entire other city nearby to smelt the ore. This too is a big operation, requiring lots of fuel and water, and it absolutely wrecks the environment. Transporting the ore out then requires still more energy. Industrial mining is only possible because locomotives make it cheap to move tons and tons of materials around -- if the mines are producing thousands or tens of tons of ore a day, they need a way to transport that over long distances to whatever market needs all this ore.
You are describing exactly the situation of Kiruna, in Northern Sweden. It is not one of the biggest deposits, but it is still relevant because the ore is magnetite, which is cheaper to purify than from other sites.
The mineral is in a downwards slope, going under the city.
The text is in Swedish, but the mineral is the "metallic" looking diagonal. The cracks coming up from the excavated part are caused by rock collapsing. The white channels are the tunnels used to access the ore, and the red are the future tunnels.
They have now started to dig deep enough that the city itself will be affected, so the whole city is being moved, building by building. The current evacuated area will still be safe to walk on, but not to build anything bigger than a shed, since the ground will suffer displacements.
So, answering your question, you cannot really mine ore from under a city and expect everything on top to stay put, unless you seriously restrict the amount of material that they can extract from each location. It may work if the buildings are small, so they can deal with soil displacements. You can look at Japanese architecture of the epoch corresponding to your technological level: they are very good at building things that can withstand moving ground.
Or you could side-step it and place the city on the other side of the ore. This places the entry of the mine on the safe side (inside of town), and only the fields are affected by ground displacements, which is not a problem.
Undermining was used in sieges for many centuries.
A number of buildings have been damaged by commercial mining too close to them. Hamilton Palace was demolished in 1927 partially because of damage from nearby coal mining.
The Borough of Centralia, Pennsylvania, had a population of 1,000 in 1980 but now has only 13 residents due to a a fire burning in the coal mines under the town since 1962.
So it is certainly possible for a settlement to be undermined by careless mining beneath it and that is something that the residents of your city would need to guard against.
For a real world example of what can go wrong with a mine collapse, look at the case of the Retsof salt mine: When a 500 foot square section of one of the mine chambers collapsed, it drained the aquifer for many miles around, causing water shortages in the surrounding area for nearly a decade. See https://pubs.usgs.gov/circ/circ1182/pdf/14Retsof.pdf and https://www.washingtonpost.com/archive/politics/1994/05/15/salt-mine-collapse-shakes-residents-of-genesee-valley/9d0fe3fc-9e1b-4135-ac89-ee0f38520ecd/?noredirect=on&utm_term=.57131a3aa889 for more information