We investigate a cloud radar system consisting of a radar transmitter and distributed nodes linked to a remote processing center (PC) via multiple-access wireless backhaul channels. Each node serves both as a radar receiver and relay that forwards to the PC an amplified version of the received signal. To accommodate the ever-growing demand for spectrum, the cloud radar system is required to operate over a spectrum partially shared with communication devices and services. We formulate a problem of jointly optimizing the radar waveform as well as the relay power gains to maximize a mutual information criterion that serves as proxy for detection performance. The optimization requires knowledge of second-order statistics of clutter and interference, and is constrained by limitations imposed by the bandwidth shared with communication. Numerical results show that the joint optimization is advantageous over optimizing only the radar waveform or only the relay gains.