I grew up in New York City (Queens) so YMMV, but none of these are huge blockers.
- more expensive: pre-K is now universally funded by local government and the public schooling system has decent pathways. General living expenses are more expensive, but not so much so if you're comparing with any of the NYC suburbs with decent schools.
- less safe: NYC has become, on a per-capita basis, one of the safest cities in the country, and certainly the safest large one. In general, a massive amount of "eyes on the street" helps keep crime down, whereas in the suburbs being outside alone is not uncommon.
- less space: in terms of living area and backyard, strictly speaking, yes. But I lived fine in a two-bedroom apartment with my parents. There are also houses with modest front and backyards within the city limits, and we moved to one of those with the addition of another child. Do you need 3000 sq ft and an acre of land to raise a child?
As far as outside, the city offers a lot of playgrounds and parks with other people in it. And then as you get older and outgrow the playground, the constant variety of things really helps with boredom, and many attractions like the museums are even free for residents. And the cherry on top is that the mass transit system allows children to travel without a chaperone of legal driving age, so parents don't have to pick between chauffeuring children around or keeping them at home.