I absolutely do NOT agree that Shanghai has better food. I find Shanghainese cuisine to be rather bland (with a few notable exceptions). Beijing has the entire spectrum of Chinese cooking, along with some really interesting chefs who are inventing great new dishes based on Chinese classics.
I also absolutely do NOT agree that Hong Kong is better than all other Mainland cities. Hong Kong is a terrific place, but its geographic limitations preclude the vast scope and variety of activities available in Beijing (one of my favorite cities in the world). From a cultural perspective, there is far, far more in Beijing than in Hong Kong. Beijing's major drawback is its traffic -- it can take forever to get around, but I'm willing to put it up with it.