Rainbow flag in paper
I'm a strong supporter of LGBTI+ rights, but if I encountered a rainbow flag in an article with no particular connection to those issues and nothing else to explain the choice of that symbol in particular, I'd be more confused than anything else. The editors may also be confused about whether you're trying to sneak in a political statement.

Leaving politics aside: rainbow colour schemes are often a bad idea because they're not very good at communicating information.

As Dmitry Savostyanov suggested, it's wise to ensure that your diagrams are still readable in grayscale. Rainbows often fail this test because colours far apart on the spectrum may be close together in luminance (brightness), and vice versa. Even for readers who have full colour vision and are reading the colour version, rainbow palettes can create the illusion of abrupt changes where there are none, and so forth. For those with colour-vision impairments, they're extra-poor. For more information, see Borland and Taylor's Rainbow Color Map (Still) Considered Harmful.