yeah that´s a problem some people face in that challenge
oddly enough i didn´t. i did not improve many squares to begin with (the winerys, a pasture, 2 random cottages and a farm if i remember correctly) as i couldn´t bring myself to build more than 2 workers.
that means either
a) i stopped research at the right time in order to build up money for my military (walls and longbowmen, pikemen would have been great though i think) and the 2 great prophets contributing 10
a turn certainly helped.
b) (much more likely) i did not grow enough of a military so the problem of maintaining it did not present itself.
i think it is quite tricky in the ironman challenge. you will want some commerce tiles to help you with researching and piling up some cash for the time when you will not have any improved tiles left. you have to find a point in the timeline where you can protect your tiles and another point where you sit back on your stockpiled money and be able to pay your troops for the amount of time you assume you will survive.
the first point is probably around the time you slingshot monarchy, as those wineries are just yummy. the second one? i have no clue.
i probably did not build enough units and was very conservative in my estimates of what i could afford and you apparently were too optimistic
fun challenge though, eh?