Sanitizing output that contains quotes?

Another solution would be to put the style directly in the header, and
only put the escaped values in, which would solve the double quote
issue, but in the case that no styling has been set I’m left with an
empty style in my element, and that also seems kinda unnecessary.

You could e.g. check out wp_add_inline_style and only add the style if there exists a non empty CSS theme settings value.