Mealy things contain or resemble flour or any other grain that's been ground into a powdery substance (i.e., meal). Good cornbread is moist and cake-like, instead of dry and mealy.
You'll usually find the adjective mealy describing food that doesn't taste great, whether it's an undercooked, mealy sauce or an overripe, mealy apple. In both of these examples, the food tastes dry and bland, and has a crumbly feeling on the tongue. Other mealy things might look like meal, like a mealy sandbox or the mealy bark of a tree. The Old English source of mealy is melu, "meal or flour."