

Molecular mass does not decide the solubility of any substance in a solvent. What decides that is called energy of hydration. That is how easily or quickly can this molecule enter into the intermolecular empty spaces of water, and allow water molecules to form a hydration layer around it.
In case of glucose, it first reaches the intermolecular spaces and then forms hydrogen bonds with the water molecules surrounding it to achieve more stability. This has nothing to do with its molecular weight. But obviously, the number of moles of glucose is less than the number of moles of water, only then can the entire glucose dissolve in water.
