Spectral functions of scalar mesons