What would happen if a creature who was polymorphed was affected by, for example, a neogi's Enslave ability, when the spell ended? Would the creature no longer be enslaved, since both its mental ability scores are different, or would the mind control still be in effect?
The creature would still be under the effect.
Effects such as a neogi's Enslave action, like conditions, are not part of a creature's game statistics. Therefore, despite what you might expect, the changing of a creature's mental ability scores has no bearing on (ending) such an effect. Consider that the target of the polymorph spell retains its alignment and personality.