Using bidirectional switches, you can build a synchronous buck converter that works for positive or negative voltage or current. A bypass cap on the high side, and a filter choke and cap on the low side (plus whatever EMI filtering..), is all that's needed besides the switches.
The output characteristic depends on the control method. You could go for fixed ratio (fixed PWM), which will behave very much like a transformer, where regulation is proportional to losses. Some active feedback could provide a slow servo, achieving AC voltage stabilization (like a variac with servo control). Or a fast feedback loop could even provide limited power factor correction: especially if a four switch ("flying inductor") design is used to work against a filtered DC rail, in which case harmonics and reactive power can be drawn from the line, and compensated out. DC current can also be drawn from the DC rail, or delivered to it, in which case the power is simply synchronously delivered into the grid.
But yeah, you use a transformer. I don't know if this product even exists (the "switching variac" as it were). There's absolutely nothing preventing its existence -- and it would be smaller, lighter, and could possibly be made more efficient as well -- but it will also be significantly more susceptible to transients (source and load), overheating (due to ambient or self heating), and general reliability concerns (i.e., it's not made of dumb wire and iron). If it does exist, it could even be cheaper than the transformer (part of why linear power supplies aren't used anymore -- switchers, when produced in vast quantity, are very cheap), but it seems likely that the quantity is small (if at all), and the price high as a result.
Tim