MXenes are a new rapidly developing class of two-dimensional materials with suitable properties for a broad range of applications. It has been shown that during synthesis of these materials the surfaces are usually functionalized by O, OH, and F and further suggested that controlling the surface allows controlling the material properties. However, a proper understanding of the surface structure is still missing, with a significant discrepancy between computational and experimental studies. Experiments consistently show formation of surfaces with mixed terminations, whereas computational studies point toward pure terminated surfaces. Here, we explain the formation of mixed functionalization on the surface of titanium-based two-dimensional carbides, Ti2C and Ti3C2, using a multiscale modeling scheme. Our scheme is based on calculating Gibbs free energy of formation by a combination of electronic structure calculations with cluster expansion and Monte Carlo simulations. Our calculations show formation of mixtures of O, OH, and F on the surface with the composition depending on pH, temperature, and the work function. On the other hand, our results also suggest a limited stable range of compositions, which challenges the paradigm of a high tunability of MXene properties.