Patient must have evidence of castrate resistant prostate cancer as evidenced by a confirmed rising PSA (per PCWG criteria) and a castrate serum testosterone level (i.e. =< mg/dL) At least line of taxane-based chemotherapy for the treatment of prostate cancer with documented evidence of disease progression while on therapy or within months after discontinuation of therapy in the castrate-resistant setting Progression of metastatic prostate cancer in the setting of castrate levels of testosterone or history of bilateral orchiectomy at study entry Prior use of taxane-based chemotherapy for treatment of castrate resistant prostate cancer. Previous treatment with or chemotherapy regimens including at least taxane-based regimen for metastatic (non castrate or castrate) prostate cancer. Patients may have received radium- and/or cabazitaxel, or were deemed unsuitable, declined, or did not have access to these therapies. Men with metastatic castrate-resistant prostate cancer (prostate cancer progressing despite castrate levels of testosterone [< ng/dL]), using standard measures of progression defined by Prostate Cancer Working Group (PCWG) Progression of metastatic prostate cancer in the setting of castrate levels of testosterone or history of bilateral orchiectomy at study entry mCRPC EXPANSION COHORT: Patients must have metastatic, progressive, castrate resistant prostate cancer (mCRPC) PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nMust have metastatic, progressive, castrate resistant prostate cancer (mCRPC) PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nAll patients must have at least one lesion deemed safe to biopsy and be willing to undergo a mandatory baseline biopsy PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPatients must have castrate levels of testosterone (< ng/dl [. nmol/l]) PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPatients must have undergone bilateral surgical castration or must agree to continue on gonadotropin releasing hormone (GnRH) agonists/antagonists for the duration of the study PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nECOG performance status =< PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nAbsolute neutrophil count >= ,/mcL PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nWhite blood cell (WBC) >= ,/mcL PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPlatelets >= ,/mcL PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nHemoglobin (Hgb) >= g/dL in the absence of packed red blood cell transfusion days prior to dosing PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nAST(SGOT)/ALT(SGPT) =< . X institutional upper limit of normal (ULN); for subjects with liver metastases, AST or ALT =< ULN PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nTotal bilirubin =< . X ULN; for subjects with documented or suspected Gilberts disease, bilirubin =< X ULN PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nCreatinine =< . X within normal institutional limits OR measured creatinine clearance >= mL/min/. m^ PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPatient must be capable of understanding and complying with protocol requirements and is willing to give informed consent PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPatients who have had prior treatment with olaparib or other PARP inhibitors PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nPatients who have had prior immune checkpoint inhibitors, such as MEDI or other PD or PD-L inhibitors or an anti-CTLA therapy PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nThe patient has received chemotherapy, radiotherapy, biologic agents or enzalutamide within weeks before the first dose of study treatment (nitrosoureas or mitomycin within weeks); however, for patients receiving abiraterone, they must discontinue the medication at least days before the first dose of study treatment PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nThe patient has received any other type of investigational agent within days before the first dose of study treatment PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nThe patient has received radionuclide treatment within weeks prior to the first dose of the study treatment PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nThe patient is unable to swallow tablets or capsules PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nHistory of auto-immune disease requiring steroid maintenance, or history of primary immunodeficiency PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nReceipt of live attenuated vaccination within days before the first dose of MEDI PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nThe patient has not recovered to baseline or CTCAE =< grade from toxicity due to all prior therapies, including surgery, except alopecia and other non-clinically significant adverse events (AEs) PHASE II STUDY METASTATIC CASTRATE-RESISTANT PROSTATE CANCER COHORT ELIGIBILITY CRITERIA (MEDI+O ONLY):\r\nHBV-or HCV-positive patients are ineligible Patients with prior chemotherapy given for castrate-resistant prostate cancer Histologically-confirmed () NSCLC, () bladder cancer, () castrate-resistant prostate cancer which are metastatic, or () stage C or stage melanoma. Metastatic, castrate resistant prostate cancer (M by National Comprehensive Cancer Network (NCCN) criteria) Prior cytotoxic chemotherapy or biologic therapy for the treatment of castrate-resistant prostate cancer (CRPC) Patient must have evidence of castrate resistant prostate cancer as evidenced by a confirmed rising PSA (per Prostate Cancer Working Group [PCWG] criteria) and a castrate serum testosterone level (i.e. =< mg/dL) Castrate-resistant prostate cancer (CRPC) with bone metastasis: --Progressive Disease in the setting of castrate level of testosterone Any prior chemotherapy for castrate-resistant prostate cancer Multifocal metastatic disease in either castrate sensitive or castrate resistant patients History of biopsy proven or clinically documented castrate resistant prostate cancer which is metastatic to bone as assessed by medical record review For participants with metastatic castrate-resistant prostate cancer only: