As of gnuplot 5.4.1, this is still a bug. It affects terminals pngcairo and pdfcairo, at the very least. It's a very serious problem. If you give a gnuplot script to a Windows 10 user, there's no telling how ugly his plots will turn out, because they'll be completely dependent on the Scale and Layout setting he has chosen for his display. Plots that are written to ,png or .pdf files should NOT depend on any display settings!
The problem affects terminals pngcairo, pdfcairo, and pdf, but it does not affect terminals png, jpeg, or emf.
Yes, the text size chosen by the pngcairo teminal changes, depending on the scale setting for the screen of the computer that gnuplot is run from. The "Scale and Layout" setting magnifies the display (not just text) of every window, the desktop, the task bar, etc. It shouldn't cause gnuplot to create different output files, though. The pdfcairo terminal is also affected. I haven't tried others. The example script is just the simplest one that demonstrates the problem. You can specify a font size...