Flourish is derived from the Latin root flor ‘flower’, as in florist. The sense you are looking for is a short, dramatic musical phrase, almost always played by brass instruments, i.e., a trumpet fanfare:
About half-past one o'clock, the Commander-in-Chief entered, to a flourish of trumpets. It was observed that the Duke of Wellington stepped across, and cordially shook hands with the American Minister.
A fanfare is often used to signal the beginning or end of some important event, such as this formal state visit described at the time.
In this sense, flourish can be used metaphorically:
Launched amid a flourish of publicity, the National Service Department embodied the intention of the 'Do it Now' government to mobilise the civilian working population and relate its efforts more closely to the conduct of the war on the Western Front.
To all appearances, this grand flourish of praise should have signalled a conclusion and brought the work to an end.
In your example sentence:
It would be easy to say—as many members of the media have said, to a flourish of attention, page views, and ad revenue—that all forms of RIP trolling are objectively bad, and that all RIP trolls are objectively evil.
the attention, page views, and ad revenue are like a trumpet fanfare signalling the importance of the pronouncement about RIP trolling. The choice of the metaphor is most likely ironic.
Not all metaphoric uses of flourish, however, envision trumpets:
Then when the grip of some long-enduring winter mentality begins to loosen, we find ourselves vulnerable to a flourish of possibility and we are suddenly negotiating the challenge of a threshold.
This produced a flourish of studies focused on trying to explain why people did not always use health services in the way they had been intended to be used.
Here, we’re back to flowers, which in spring, suddenly appear in great number.