Not directly. Because the variables don't exist until the program is
running; at which point there's no longer a complete "file" available
(merely a partially-consumed filetype object).
The simplest way is use the ghostscript -sDEVICE=bbox .
From vi, position the cursor on a blank line and
!!gs -q -sDEVICE=bbox -dBATCH -dNOPAUSE %
should insert the `gs`-computed BBox and Hi-ResBBox into the file.