When you settle on a Cow, the bonus from it goes away IIRC. I believe it's the same with wheat and game? But what about other bonus resources? Tobacco? Sugar? Gold?
The city center provides the same amount of food (generally 2; agricultural tribes can get 3 in despotism by settling near fresh water or anytime not in despotism or anarchy) regardless of the underlying terrain so settling on top of a food bonus wastes it.
Shield and commerce bonuses are not wasted by settling on them - the city center provides the appropriate shields and commerce based on the underlying tile.
However, the center tile always produces at least 1 shield regardless of the underlying terrain so settling on a tile that provides 1 shield and settling a tile that provides 0 shields will both provide 1 shield from size 1-6. At size 7, the city center gets +1 shield, so if you settled on a tile that gives a shield naturally (bonus grassland, plains, hills, etc.), then you will get 2 shields at size 7-12 whereas for shieldless terrain, you will still get 1 shield per turn from the center tile.