I think in this case, water isn't in such a huge excess compared to the other reagents as is assumed in most cases. To recognise this requires you to know how esters are synthesised in practice (e.g you ideally mix pretty much pure alcohol and a pretty much pure carboxylic acid with concentrated H2SO4, so there isn't a lot of water).
When water is in a huge excess, we can assume the mixture is almost pure water and so at A level, one would say that its concentration changes so little that it doesn't need to be included in the equilibrium constant. This isn't quite true in reality and the actual explanation would require you to be familiar with "activities", which are quantities related to the concentration. Pure liquids have activities of 1, so they are in fact accounted for in the equilibrium constant, but you just put a 1 in their place and so seemingly they don't contribute to the expression when they in fact do.