On macOS, an app launched by a GUI launcher (Finder, Dock, Spotlight, etc.) inherits a relatively empty environment, and there are no sane ways to change it. The situation caused complaints about tools working in a terminal not working when launched from the IDE. That is why the IDE attempts to load a shell environment on startup. To do this, it starts a shell in background and instructs it to run a helper process. And since 2021.2, the IDE shows a notification when the loading fails.
The most common reason is a shell initialization script interacting with a terminal. The IDE has to use the -i option to run a shell in the interactive mode because environment modifications usually occur in ~/*rc scripts, and these scripts take the ability to interact with a terminal for granted. Unfortunately, a shell launched from the IDE has no access to a terminal, and the loading either fails with an error or times out (for more details, look for the "can't get shell environment" line in the log).
To fix the loading and get rid of the notification, please change the script so that all possible terminal interactions are skipped when a shell is launched by the IDE; one possible way is to put them inside conditional blocks:
if [ -z "$INTELLIJ_ENVIRONMENT_READER" ]; then