Vacuum energy of Schr\"odinger operators on metric graphs