You can drop a sh-compatible script into /etc/rc.conf.d, e.g. /etc/rc.conf.d/autossh that can set environment variables and start up autossh according to your needs. Those get executed on bootup (only).