No, you have it right so far. \$v_L\$ is equal to \$V_g\$ for the first part of the cycle and \$V_{out}\$ for the second part. So your volt-seconds balance equation ends up being:
$$DV_g + (1-D)V_{out} = 0$$
The negative sign comes out of the algebra you do to isolate \$V_{out}\$ on one side of the equation.
UPDATE: Sign convention doesn't really tell you anything about the physical voltage, it just determines the signs in your equations. If you invert the polarity of \$v_{out}(t)\$ in the schematic, your volt-seconds equation becomes:
$$DV_g - (1-D)V_{out} = 0$$
and \$V_{out}\$ will be "positive". But \$V_{out}\$ didn't really change -- the lower potential is still at the top node; you just defined that to be "positive"! In your graph, the inductor voltage will be positive for one part of the cycle and negative for the other. You can choose which is which by defining the polarity, but they'll always be opposite.
UPDATE 2: You asked how we get a negative voltage. Start with the volt-seconds balance equation:
$$DV_g + (1-D)V_{out} = 0$$
Solve for \$V_{out}\$:
$$V_{out} = -\frac{D}{1-D}V_g$$
So if \$V_g\$ is positive, \$V_{out}\$ will be a negative number. The sign convention tells you that a negative \$V_{out}\$ means the potential is lower at the top of the resistor and higher at the bottom.
Now, let's say you define \$V_{out}\$ the other way:
simulate this circuit – Schematic created using CircuitLab
During the second part of the cycle, the inductor is connected to the output, and you get:
$$v_L(t) = -V_{out}$$
In the volt-seconds balance equation, this becomes:
$$DV_g - (1-D)V_{out}$$
Solving for \$V_{out}\$ now gives you:
$$V_{out} = \frac{D}{1-D}V_g$$
and if \$V_g\$ is positive, \$V_{out}\$ will be a positive number.
Both of these approaches give the same result -- the buck-boost converter inverts the input voltage. It's just a question of whether you say that in the schematic or in the number.
Why do it the way your schematic does? Because it means the output voltage is defined the same way for different kinds of converters.
Best Answer
Going from -3.7V to -32V to is a boost, a negative boost.
To make things more less confusing, here's are application notes Designing a negative boost converter from a standard positive buck converter and Positive Buck Regulator Makes Negative Boost DC/DC Converter. (The regulators in these app notes are intended to be positive bucks, but repurposed as negative boosts.)
For a simple inductive boost converter, it's advisable not to have a boost factor greater than 6. This applies to both positive and negative boost.
p.s. We’re situated roughly in the same neck of the woods, interestingly.