In a buck boost inverting converter is there any difference exchanging the position of the diode from the positive to the negative rail?
In your second circuit, the switch is directly connected between the input and output, and this means that the signal on the switched node is directly connected to the output, meaning that the output is not referenced to ground, so that circuit is probably broadcasting RFI all over the place, which will not only make you unpopular with the neighbors, but it will also hurt efficiency.

A normal buck-boost, which is your first diagram if "+" is considered to be ground, shares the grounded end of the inductor between input and output and takes the inverted rail from the switched node via the diode.