And quite unfortunately, there are no way to set system-wide environment variable.
This is because environment variables can be inherited only from parent process and no way to set environment variable of parent process from its child processes.
For example, if you invoke another shell from command line and set an new environment variable FOO to have value BAR and exit, you cannot see environment variable FOO.
The root parent among all process tree is init(8) and rc scripts which handles /etc/rc.conf is/are one of child process of init(8), thus, cannot affect the environment variables of init(8), AFAIK.
To achieve system-wide environment variable (assuming users of the computer can choose their login shells freely), we would need mechanism to set them in /boot/loader.conf and pass them to init(8) via kernel, maybe via special kenv. But this is not implemented AFAIK.
Another but annoying option would be disallowing any shells other than /bin/sh and set system-wide environmen variable in /.profile or /etc/profile.
This is because environment variables can be inherited only from parent process and no way to set environment variable of parent process from its child processes.
For example, if you invoke another shell from command line and set an new environment variable FOO to have value BAR and exit, you cannot see environment variable FOO.
The root parent among all process tree is init(8) and rc scripts which handles /etc/rc.conf is/are one of child process of init(8), thus, cannot affect the environment variables of init(8), AFAIK.
To achieve system-wide environment variable (assuming users of the computer can choose their login shells freely), we would need mechanism to set them in /boot/loader.conf and pass them to init(8) via kernel, maybe via special kenv. But this is not implemented AFAIK.
Another but annoying option would be disallowing any shells other than /bin/sh and set system-wide environmen variable in /.profile or /etc/profile.