Q:

global environmental variable not defined in .sh, but defined in console

I'm using zsh, I have defined new global environmental variable in ~/.zshrc
echo $0
-zsh

echo $PATH_TO_BINARY from console prints /Users/user/some_path
But if I create run_me.sh with content echo $PATH_TO_BINARY it prints nothing. 
Same in python:
python -c "import os; print(os.environ['PATH_TO_BINARY'])"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'PATH_TO_BINARY'

A:

You don't appear to have an environment variable.  It sounds like you have a line like the following in .zshrc:
PATH_TO_BINARY=/Users/user/some_path

That's not an environment variable; it's just an ordinary shell variable.  To add it to the environment (so that it will be passed to the environment of any child processes), you need to use the export command. 
Add the following to your .zprofile file (not .zshrc):
export PATH_TO_BINARY=/Users/user/some_path

