The mean-field Landau-type theory is used to analyze the polarization properties of epitaxial ferroelectric thin films grown on dissimilar cubic substrates, which induce biaxial compressive stress in the film plane. The intrinsic effect of the film surfaces on the spontaneous polarization is taken into account via the concept of the extrapolation length. The theory simultaneously allows for the influence of the misfit strain imposed on the film lattice by a thick substrate. Numerical calculations are performed for PbTiO3 and BaTiO3 films under an assumption of the polarization reduction in surface layers. The film mean polarization is calculated as a function of film thickness, temperature, and misfit strain. It is shown that the negative intrinsic size effect is reduced in epitaxial films due to the in-plane compression of the film lattice. At room temperature, strong reduction of the mean polarization may take place only in ultrathin films (thickness ~ 1 nm). Theoretical predictions are compared with the available experimental data on polarization properties of BaTiO3 films grown on SrRuO3 coated SrTiO3.