Shanghai stocks rose on Wednesday as real estate and banks rebounded sharply, but the blue-chip index fell, dragged down by healthcare and consumer staple shares.