You can beat it, and the trick is to attack the eye. Lock on and you'll target the Cave of Wonders' eye directly.
Keep striking it and the eye you've been hitting turns yellow. Once it does, switch to the other eye and do the same until that one goes yellow too. At that point the darkness inside is destroyed and the Cave is freed.
That's as much as I'll say, because the finish is worth seeing for yourself. Good luck.