However, Keats did not say that physics destroyed beauty. Contrary to what seems to be the common belief, the general Romantic position on science is not that science is bad but that science is good, not that it interferes with our sense of beauty but that it stimulates it. What the Romantics opposed is what today would be called scientism, which is out to destroy the wonder of the world by making everything turn out to be nothing important. What they don't like is the Merely syndrome: that a rainbow is merely a refracted spectrum, that animal behavior is merely genes and environment, that the moon is merely a hunk of rock in empty space, that sexual attraction is merely a particular combination of hormones in the body. On the Romantic view, the Merely syndrome is a pernicious attitude that involves continually missing the point. In the Romantic universe there is no such thing as 'merely': things are valued for what they are, and you can't fully understand anything by reducing it down. A Romantic may well allow that sexual attraction is a combination of hormones in the body; but he will repudiate anyone who thinks that this is an adequate account of sexual attraction, because it leaves out of the description everything that makes sexual attraction wonderful, beautiful, dangerous, inspiring, destructive, etc.
Keats's comment about 'unweaving the rainbow' in his two-part poem, Lamia, is scarcely relevant, and a reading of the poem would show it, since the remark is not about rainbows but a simile for the tragedy of Lamia, a demoness in love with a man. Keats was following the story as he found it in Burton's Anatomy of Melancholy:
Philostratus in his fourth book _de vita Apollonii_, hath a memorable instance in this kind, which I may not omit, of one Menippus Lycius, a young man twenty-five years of age, that going between Cenchreas and Corinth, met such a phantasm in the habit of a fair gentlewoman, which taking him by the hand, carried him home to her house in the suburbs of Corinth, and told him she was a Phoenician by birth, and if he would tarry with her, "he should hear her sing and play, and drink such wine as never any drank, and no man should molest him; but she being fair and lovely would live and die with him, that was fair and lovely to behold." The young man a philosopher, otherwise staid and discreet, able to moderate his passions, though not this of love, tarried with her awhile to his great content, and at last married her, to whose wedding, amongst other guests, came Apollonius, who, by some probable conjectures, found her out to be a serpent, a lamia, and that all her furniture was like Tantalus's gold described by Homer, no substance, but mere illusions. When she saw herself descried, she wept, and desired Apollonius to be silent, but he would not be moved, and thereupon she, plate, house, and all that was in it, vanished in an instant: "many thousands took notice of this fact, for it was done in the midst of Greece."
Keats is just telling this story, not writing a treatise in criticism of science. The famous phrase is just part of a simile for the story:
What wreath for Lamia? What for Lycius?
What for the sage, old Apollonius?
Upon her aching forehead be there hung
The leaves of willow and of adder's tongue;
And for the youth, quick, let us strip for him
The thyrsus, that his watching eyes may swim
Into forgetfulness; and, for the sage,
Let spear-grass and the spiteful thistle wage
War on his temples. Do not all charms fly
At the mere touch of cold philosophy?
There was an awful rainbow once in heaven:
We know her woof, her texture; she is given
In the dull catalogue of common things.
Philosophy will clip an Angel's wings,
Conquer all mysteries by rule and line,
Empty the haunted air, and gnomed mine -
Unweave a rainbow, as it erewhile made
The tender-person'd Lamia melt into a shade.
Perhaps Keats thought the story a haunting one -- which it is; there's no need to read it allegorically (although it is open to it, Romantic poems like this one generally contain amiguities that don't allegorize well). The story is a tragedy; and tragedies don't have to have villains, just a sad and painful crossing of things that cannot happily go together, the manifestation of things that cannot happily be. The poem is a multifaceted thing; it would be a shame to treat its rainbow metaphor as just a critique of science, particularly without noticing the ambiguities. Apollonius, for instance, is right, Lycius is besotted, and Lamia is clearly dangerous. This isn't the whole of it anymore than the other interpretation is, but one can just as easily read it as a sad recognition of the need for our illusions, however lovely, to be destroyed. The poet draws no moral one way or another.