Quantum phases of incommensurate optical lattices due to cavity backaction