I have different plots in my graph.

The plots’ colors are immutable because they represent fix meanings. Is it possible to set the color of the axis labels depending on the background color? Alternatively, a text shadow or border would be sufficient too.
Not automatically, but you can create custom axis labels. The custom labels could use different text styles (which includes the color), shadows, fills, and/or border.