On my system (F39 Silverblue), egrep is an alias. Only when I delete that alias do I see that warning from /usr/bin/egrep. The alias is defined in /etc/profile.d/colorgrep.sh.
What shell are you using? You mentioned both .bashrc and .zshrc
Assuming bash, does it appear again if you run bash inside the shell? If so, try bash -x to trace it.
Yes, that one is super annoying, because it bugs the user without any hint on the root cause. If it was meant to be useful it should have included $PPID or $(pstree $PPID) in its output (or even higher up the dependency tree).
The alias egrep 'grep -E --color=auto', while being useful, is a double bummer, because it trains people to use egrep, and once they write that in their scripts it depends on the presence of the alias.