Does a glider pilot need to file an IFR flight plan to legally fly in cloud in class E airspace in the US?
As answered here, requesting a pop-up IFR from ATC counts as "filing" a flight plan.

It should be noted, as explained here, that airfiling with ATC is a "workload permitting" activity, meaning ATC is not obligated to grant it. They can always refer you to FSS.

Climbing or descending through a cloud layer is one of the generally accepted use cases for pop-up IFR requests, so while ATC might be surprised by a glider asking for it, I can't see why they wouldn't treat it the same as an airplane requesting the same.

The main challenge I see, at least for non-motor gliders wanting to climb, would be phrasing the request correctly to get a clearance they can physically comply with. Maybe "circling within Xnm of present position" to allow for thermaling? It's also possible to request a 3D box if you want to do more complicated maneuvers/work; I'm pretty sure I've seen a question here on that.