Radio, millimeter-submillimeter, and infrared spectra of flat-spectrum extragalactic radio sources