Modern OPAMPs are designed to have a \$0\mathrm{V}\$ output and input reference level, when powered from a symmetric power supply, i.e. \$V_0=0\mathrm{V}\$ if \$V_+=V_-\$ in the ideal case, when no other errors (offsets etc.) occurs: this is due to the fact that, in doing so, the input and output voltage ranges are maximized in the sense that you can go over and below respect to the given reference level by the same amount of voltage.
Thus, referring to the following schematics, where \$V_\mathrm{ref}\$ is an arbitrary reference voltage for the inputs, every asymmetry in the supply voltage would appear, again in the ideal case and when no feedback is applied, as an output offset voltage \$V_{o_\mathrm{off}}\$
simulate this circuit – Schematic created using CircuitLab
$$
V_{o_\mathrm{off}}=\frac{V_++V_-}{2}\quad(\text{in our case}=0.5\mathrm{V}\text{ since }V_+=15\mathrm{V},\:V_-=-14\mathrm{V}),
$$
which assumes also the role of a new reference level for the inputs.
When a feedback is present, the effect of the asimmetry in power supply voltage is taken into account by considering the reference potential of the input and the output to be \$V_{o_\mathrm{off}}\$ instead of zero: this is the common situation faced when designing single supply (\$V_+=V_{DD}\$, \$V_-=0\$) circuits. In the example proposed we have the following situation:
simulate this circuit
where \$V_u\$ is the inner output voltage which adds to the offset voltage in order to produce the real output.
Now consider your inverting amplifier circuit, where feedback is applied, the gain is
$$
A_v=-\frac{R_{fb}}{R_{i}}=\frac{1\Omega}{1\Omega}=1.
$$
By applying the virtual reference pin principle we get
$$
\frac{V_o}{R_{fb}}=\frac{V_u+V_{o_\mathrm{off}}}{R_{fb}}=-\frac{V_i}{R_i}\implies V_o=-\frac{R_{fb}}{R_{i}}V_i\tag{1}\label{1}
$$
As you can see from formula \eqref{1}, the behavior of the asymmetrically powered circuit is absolutely identical to the balanced one: the only difference (in the ideal case, I stress) is that the input and output range will be asymmetrical, as clipping occurs when \$V_i\ge +14\mathrm{V}\$. This implies that in your first circuit, when
(a) \$V_{i}=1\mathrm{V}\implies V_o=-1\mathrm{V}\$.
(b) \$V_{i}=-15\mathrm{V}\implies V_o=15\mathrm{V}\$.
(c) \$V_{i}=0.5\mathrm{V}\implies V_o=-0.5\mathrm{V}\$
In your second circuit, the non inverting unity gain buffer powered \$V_+=+40\mathrm{V}\$ and \$V_-=+10\mathrm{V}\$, the output with \$V_i= +12\mathrm{V}\$ will be \$V_o= +12\mathrm{V}\$ while it will be stuck at
\$V_o= +10\mathrm{V}\$ for every input \$V_i\le +10\mathrm{V}\$.
Notes
The above analysis describes what happens in the ideal case, as opposed tho the real case: in the real world, obviously, there are other issues that cause the output voltage to be different from \eqref{1}, and a few of them are described below.
- a very important issue pointed out by WhatRoughBeast in his answer is the influence of the PSSR, especially important when the asymmetry of power supply is in the form of a noise/power supply ripple: even in this cas,e the asymmetry voltage, multiplied by the PSSR, is modeled as an additional noise contribution at the inputs.
- As Sparky256 pointed out, apart from the ideal reduction of maximum output swing, there are other problem related to the output driving capability of the OPAMP related to its circuit structure and characterized, more or less fully, in its datasheet. Also, I would like to point out the changes in the common mode voltage very important in those applications where you need to amplify very small signals.