Random moment problems under constraints