City specialization should take into account not just "which specialists should I run where" but also where the pairings of national wonders should go.
I've also found that the map I'm given doesn't allow for pure-pure specialization and the terrain for what I want to build is often imperfect. Life's a b*tch and then you DOW.
What I do is:
1) If the capital is centrally-located relative to the other cities I build, and has good terrain for cottages, it remains the capital and becomes the Science City as well (lowest maintenance means slider science will be highest under those conditions, and good food will allow at least 2 scientists to be flipped there). This doesn't mean it gets cottages right away, but the land is planned, long-term, for cottages. In an early axe-rush is may just get farms for a whip-army. Cottage later when conditions are more stable and you aren't in desperate need for axemen.
2) I try to locate, if possible, a good river-side tile with food and lots of forest, as a future Production center. I DO NOT CHOP here, as it will need all the tree health it can get. Lumber mills with railroads make up for the lost hammers later on. This city gets at least Iron Works, and some other plug-in of national wonder that won't fit elsewhere (e.g., Mount Rushmore).
3) Another specialized spot I try to find is a place with lots and lots of either trees OR JUNGLE, for future use as a National Forest + Shakespeare's Theater synergy combo. This means the city can grow large large LARGE (both health and happiness will be high) and you get lots of free specialists from the NF. The GP farm? Now you've got TWO!!!
4) The standard GP farm gets National Epic, and when at all possible I try to engineer wonders there (adds to the GPPs). What other national wonder goes there will depend on the map. Sometimes you end up with a coastal GP farm (tons of seafood) and Moai makes more sense. Sometimes... not.
5) I try to find a good high-production COASTAL city (except on pangea) for Militaryville: Heroic Epic and West Point. This means that not only will your land units get good promotions, but naval vessels as well. Without a good navy your late game plans will be ripped to shreds by a sea-superior AI. This plugs that gap.
6) Key border culture-war cities get Hermitage and as many different religions as possible (to build cathedral-type buildings, for yet more culture).
Variations on this are legion. If I start with Mysticism I try to do a double religion-pop: Polytheism (Hinduism) and Monotheism (Judaism) in the cap city. It sets a few other things back, but a Double-Holy with shrines for both make for a highly-rich Wall Street city later in the game. This same capital city CAN also be the science city, but often not. Often your starting capital is in a crappy place (I usually play Continents and the game loves to stick you on tundra surrounded by desert, so the capital is just a bunch of tents building settlers to get the f*** out of dodge and go to greener pastures ASAP). But it doesn't matter too much what the tiles are like in a double-holy city, as its primary revenue is from pilgrims, not cottages.
Terrain doesn't always allow for having both an Iron Works production center and a forrested wonderland for free specialists. Sometimes it makes more sense to leave some trees unchopped in the GP farm and combine NE with NF and use some other method to try to keep citizens happy there. Or the converse, combine NE with ST and just food your way past the health limit.
Quite often you don't get really good commerce cities until you TAKE one from an AI. I'm quite often okay with that. If I'm on terrain that's only production-friendly, I produce. UNITS.
To me it's more key to peacefully settle the pristine forest land and keep it pristine, because there's no taking that from an AI (any land the AIs settle they always chop it to death, so the bonuses for an Iron Works or National Forest are gone forever). Cottages you can take or grow later. Trees you need NOW. In fact get as many forests as you can because the ones you won't keep pristine for IW or NF, you can chop those for gearing up your axe rush.
Your mileage may vary, and your map definitely will.