Charge carrying particles are accelerated and slammed into charging capacitor. Energy goes into acceleration which results in heat of charged capacitor (this can cover 100% of lost energy)
... which is exactly normal behavior for capacitors, normally modeled as "ESR", causing all of the losses, which typically vary between 0.1% and 50% depending on how the caps are used... And yes, surprise surprise, it's practically only heat being generated, which is kinda boring.
Of course, the resistance of the metal foils inside a capacitor is also there in "ESR" which is just the sum of all those forms of resistances. And in the end, it doesn't matter, but yeah, resistance is not a description of any single concrete physical phenomenon, but a roof term for something that can be caused by several different mechanisms, but cause the same result - a voltage drop dependent on current. Usually, but not necessarily, with energy lost as heat.
This is even more obvious when batteries are considered, because they have A LOT* of "kinetic energy" losses because ions swim slowly. And people on forums are REALLY confused as they think this is something "different" from just having resistance, but it isn't. Voltage drop is a voltage drop and the batteries heat up just like the drop predicts, losses are ~I^2, efficiency depends linearly on charge/discharge times, and nothing fancy happens here, because a slowly swimming ion loses its energy sweating just like an electron in a wire does, and in the end, an electric motor loses its efficiency when overworked exactly in the same way a battery does.
You can't say whether it is a resistance caused by electrons frictioning when trying to run in a metal lattice (resistance of a copper wire, for example), or ions running in an "sticky" electrolyte, or electrons banging on the foils in a capacitor. This is just ESR and we have to face it everyday, in all cases.
*) compared to capacitors, at least; in a battery, the metal foils do not contribute to the resistance that much, but with a capacitor, I wouldn't necessarily say that.