Am I legal to fly under the hood with a safety pilot who does not have a current medical? VMC only, not IMC.
As explained in AC 68-1A, a safety pilot requires a current medical:
A pilot acting as a safety pilot per part 91, § 91.109(c), however, would be a required pilot flightcrew member by regulation rather than a passenger. Section 91.109(c) provides that no person may operate a civil aircraft in simulated instrument flight unless the other control seat is occupied by a safety pilot who possesses at least a private pilot certificate with category and class ratings appropriate to the aircraft being flown. Because a safety pilot is a required pilot flightcrew member, the safety pilot is required to hold a valid and appropriate medical certificate in accordance with § 61.3(a).
For information on a safety pilot using BasicMed see this question.
By the way, by definition a safety pilot is only required in VMC. In IMC you're in actual instrument conditions; see this question.