We obtain the general conditions for the emergence of odd-frequency superconducting pairing in a two-dimensional (2D) electronic system proximity coupled to a superconductor, making minimal assumptions about both the 2D system and the superconductor. Using our general results we show that a simple heterostructure formed by a monolayer of a group VI transition metal dichalcogenide, such as molybdenum disulfide, and an s-wave superconductor with Rashba spin-orbit coupling exhibits odd-frequency superconducting pairing. Our results allow the identification of a new class of systems among van der Waals heterostructures in which odd-frequency superconductivity should be present.