A quasi-two-dimensional Peierls-Hubbard model with the typical two types of anharmonic phonons has been studied, so as to clarify both the enhancement and reduction of isotope shifts of superconducting (SP) transition temperature Tc, as well as the competition between the metallic state and the charge-density-wave (CDW) or spin-density-wave (SDW) state. The first type is a sextic anharmonicity like a hard-core repulsion, and the second type is a small negative quartic anharmonicity in addition to the sextic one, just like a mixture of a hardcore and a soft one. This theory is based on the mean-field approximation for electrons and a variational method for phonons. In the first type, the Peierls distortion is excessively suppressed, and the SP state becomes more stable than the CDW, even when electron-phonon (e-ph) coupling is very strong. Thus, Tc of this case is enhanced, but has no isotope effect. In the second type, in contrast, the SP state is suppressed by the CDW when e-ph coupling is strong. The Tc of this case is reduced, but shows a strongly enhanced isotope shift. In both cases, the SDW is always suppressed.