Any common Audio output on any electronic device is in essence a two-channel Digital-to-Analog converter, where the voltage sent to each of the channels (Left, Right) powers the electromagnet that drives the movement of the speaker membrane. Instead of sending a cyclic waveform like a sine, you generate a "sound" that is in essence one fixed level, silence but with bias against the "zero value". By gradating that level you can use that signal to other purposes - I did use it, driving a DC motor directly from my ISA SoundBlaster16 card in the past (it had some wicked strong on-board amplifier!)
In more modern hardware though, getting there may be more difficult. Codecs and such will often identify constant signal and replace it with zero on output, or such. How is it done in Raspberry Pi? I don't know, I'm asking.
Can I drive the built-in audio output (jack) directly - bypassing codecs, just tell the chip to output certain voltage level to the audio output which then I would use to drive some external components? I realize I can do PWM but that's not entirely the same thing - I'm interested in pushing specific voltage levels, instead of just a full-voltage signal with specific fill. If it's possible, could you write, how - on the software side?