Strong coupling of qubits to spectrally structured media using superconducting circuits