Effects of lateral compression on out-of-plane deformation of two-dimensional MoSe2 layers are investigated. A MoSe2 monolayer develops periodic wrinkles under uniaxial compression and Miura-Ori patterns under biaxial compression. When a flat MoSe2 monolayer is placed on top of a wrinkled MoSe2 layer, the van der Waals (vdW) interaction transforms wrinkles into ridges and generates mixed 2H and 1T phases and chain-like defects. Under a biaxial strain, the vdW interaction induces regions of Miura-Ori patterns in bilayers. Strained systems analyzed using a convolutional neural network show that the compressed system consists of semiconducting 2H and metallic 1T phases. The energetics, mechanical response, defect structure, and dynamics are analyzed as bilayers undergo wrinkle-ridge transformations under uniaxial compression and moiré transformations under biaxial compression. Our results indicate that in-plane compression can induce self-assembly of out-of-plane metasurfaces with controllable semiconducting and metallic phases and moiré patterns with unique optoelectronic properties.