Generally, Shanghai is relatively cheap compared to America or Europe. If you want to learn mandarin or work here, the cost depends on your lifestyle. For example, if you live in the suburbs, the rent would not be higher than 1500 yuan. But if you want to find a house in the center of the city, the fees would be higher than 2000 yuan.
Compared to Beijing, Shanghai is relatively expensive. In Beijing, bus ticket is 1 yuan and subway ticket is 2 yuan. But in Shanghai, the cheapest subway ticket is 3 yuan! When it comes to the cost of food, many Chinese people buy steamed stuffed bun for breakfast. Little buns are very cheap and the price would not be higher than 2 yuan. Lunch fees are a little higher and the price depends on the food you eat. Some people choose to take lunch from home - this is the most economical way. After work, you can choose to cook dinner by yourself or eat in restaurants. In my opinion, the cost of meals' fees per day could be as low as 40 yuan. 1200 yuan per month is enough for you feed yourself. Combined with traveling fees and house rents, 3500 yuan would be enough.
So, if you want to learn mandarin or work in Shanghai, the cost is not too high. When you want to live better and eat better, with no doubt in mind, the cost will be higher.