Spectral representations for solutions of certain abstract functional equations