  The estimation of galaxy stellar masses depends on the assumed prior of the
star-formation history (SFH) and spatial scale of the analysis (spatially
resolved versus integrated scales). In this paper, we connect the prescription
of the SFH in the Spectral Energy Distribution (SED) fitting to spatially
resolved scales ($\sim\mathrm{kpc}$) to shed light on the systematics involved
when estimating stellar masses. Specifically, we fit the integrated photometry
of $\sim970$ massive (log (M$_{\star}$/M$_{\odot}) = 9.8-11.6$), intermediate
redshift ($z=0.5-2.0$) galaxies with $\texttt{Prospector}$, assuming both
exponentially declining tau model and flexible SFHs. We complement these fits
with the results of spatially resolved SFH estimates obtained by pixel-by-pixel
SED fitting, which assume tau models for individual pixels. These spatially
resolved SFHs show a large diversity in shapes, which can largely be accounted
for by the flexible SFHs with $\texttt{Prospector}$. The differences in the
stellar masses from those two approaches are overall in good agreement (average
difference of $\sim 0.07$ dex). Contrarily, the simpler tau model SFHs
typically miss the oldest episode of star formation, leading to an
underestimation of the stellar mass by $\sim 0.3$ dex. We further compare the
derived global specific star-formation rate (sSFR), the mass-weighted stellar
age (t$_{50}$), and the star-formation timescale ($\tau_{\mathrm{SF}}$)
obtained from the different SFH approaches. We conclude that the spatially
resolved scales within galaxies motivate a flexible SFH on global scales to
account for the diversity of SFHs and counteract the effects of outshining of
older stellar populations by younger ones.
