Casimir effect and thermodynamics of horizon instabilities