Saw this in a building's external wall here in Krakow. It's hard to describe because I frankly don't know what it is - the building itself is very old, probably hundreds of years, and I guess this opening has something to do with ventilation.
For those who asked: this was taken on the corner of a street wrapping round a church next to the main operatic theatre off the planty. The building itself is actually quite low and squat, but your theories as to its use seem to make more sense than mine. It's the corner of the planty nearest the underpass to the railway station.