Flexural deformations and collapse of bilayer two-dimensional crystals by interlayer excitons