Mechanical stress driven by rigidity sensing governs epithelial stability