Ab initio computation of two-dimensional electronic spectra is an expanding field, whose goal is improving upon simple, few-dimensional models often employed to explain experiments. Here, we propose an accurate and computationally affordable approach, based on the single-trajectory semiclassical thawed Gaussian approximation, to evaluate two-dimensional electronic spectra. Importantly, the method is exact for arbitrary harmonic potentials with mode displacement, changes in the mode frequencies, and inter-mode coupling (Duschinsky effect), but can also account partially for the anharmonicity of the involved potential energy surfaces. We test its accuracy on a set of model Morse potentials and use it to study anharmonicity and Duschinsky effects on the linear and two-dimensional electronic spectra of phenol. We find that in this molecule, the anharmonicity effects are weak, whereas the Duschinsky rotation and the changes in the mode frequencies must be included in accurate simulations. In contrast, the widely used displaced harmonic oscillator model captures only the basic physics of the problem but fails to reproduce the correct vibronic lineshape.