Intermediate-mass dilepton spectra and the role of secondary hadronic processes in heavy-ion collisions