As others have mentioned, it might affect sound quality in terms of passing a tiny bit of environmental sound, because ANC isn't 100% efficient. But in terms of hearing, ANC itself has no negative effects on its own, and it is definitely way less damaging to your hearing than if you used the same earphones in the same environment, but without ANC.