Patients in both cohorts must have progressive disease following prior therapy; specifically:\r\n* Cohort (NSCLC): Patients must have evidence of radiologic or clinical disease progression during previous treatment with systemic PD- directed therapy and/or have been deemed not to derive clinical benefit from PD- directed treatment; this includes patients who demonstrated an initial response and subsequent progression; no prior treatment with chemotherapy or targeted agents are required; intervening therapy is allowed between previous PD- directed treatment and there is no required interval from prior PD- treatment required; PD- directed treatment includes treatment with antibodies targeting the PD- receptor such as pembrolizumab or nivolumab, as well as PD-L targeted antibodies such as MEDI (durvalumab), atezolizumab and avelumab; these agents may have been administered as part of a clinical trial\r\n* Cohort (colorectal cancer): Patients must have progressed on >= one line chemotherapy No prior treatment with any therapy on the PD-/PD-L axis Prior PD-- or PD-L-directed therapy. Prior treatment with an agent that blocks the PD-/PD-Ligand pathway; Prior therapy with a PD-, PD-L, PD-L or CTLA- inhibitor or a lung cancer-specific vaccine therapy Prior therapy with any antibody or drug targeting T-cell coregulatory proteins (immune checkpoints), such as PD-, PD-L, or cytotoxic T lymphocyte antigen-. Tissue specimen available for retrospective analysis of PD-, PD-L, LAG-, and MHC-II expression Histologically or cytologically confirmed unresectable or metastatic melanoma that had confirmed progressive disease during treatment with anti-PD-/PD-L therapy. Subjects with BRAF activating mutation could have also received a BRAF inhibitor and/or MEK inhibitor regimen prior to anti-PD-/PD-L therapy. Previous exposure to any immunomodulatory agents (e.g., anti- CD, CTLA-, PD-/PD-L, IDO inhibitors) or any other immunomodulatory agent (with the following (except PD-/PD-L in subjects with unresectable or metastatic melanoma) History of life-threatening toxicity related to prior anti-PD-/PD-L treatment for subjects with metastatic melanoma Prior therapy with PD-/PDL- inhibitors is allowed provided any toxicity attributed to prior PD-- or PD-L-directed therapy did not lead to discontinuation of therapy. Prior treatment with combination CTLA- and PD-/PD-L blockade. Prior treatment with a PD-/PD-L inhibitor Prior therapy with an immune checkpoint inhibitor therapy is allowable. A -week washout period will be required for those with prior PD- or PD-L treatment. For patients with mCRPC, prior exposure to any agent (approved or investigational) that blocks the PD-/PD-L pathway. Patient may be second- or later-line NSCLC patient, and must have documented radiological and/or clinical progression on a prior anti-PD-/PD-L containing therapy. Prior treatment with a platinum-based (cisplatin or carboplatin) regimen and a PD- or PD-L monoclonal antibody (either in combination or sequentially). Prior treatment with a PD-, PD-L or PD-L inhibitor Prior PD-/PD-L treatment is permitted in Part B of this study, but only subjects who have progressed on their prior PD-/PD-L treatment without a partial or complete response, and without discontinuing for drug-related toxicity are eligible for Part B. Patients undergoing elective pancreatoduodenectomy (PD) for any diagnosis/indication Patients undergoing a minimally invasive PD, such as laparoscopic or robotic PD For Phase a and b, prior PD- or PD-L therapy or other immunotherapy is allowed, if the following criteria are met: Prior treatment with PD- or PD-L inhibitor Patients must have evidence of radiologic or clinical disease progression during or within months of previous treatment with systemic PD- directed therapy, or have stable disease on prior PD- therapy (at least doses) and/or have been deemed not to derive clinical benefit from PD- directed treatment; PD- directed treatment includes treatment with antibodies targeting the PD- receptor such as pembrolizumab or nivolumab, as well as PD-L targeted antibodies such as durvalumab; these agents may have been administered as part of a clinical trial, and/or in combination with other immunologic agents such as CTLA- inhibitors or other investigational agents Inclusion Criteria (Phase and Melanoma and HNSCC patients)\n\n - Eastern Cooperative Oncology Group (ECOG) Performance Status (PS) of or .\n\n - Life expectancy of at least months.\n\n - Have provided tissue biopsy sample enough for PD-L expression level testing and RNA\n expression profiling.\n\n Inclusion Criteria: Phase Melanoma patients\n\n - Histologically or cytologically confirmed unresectable or metastatic (stage IV)\n melanoma.\n\n - Have at least sites that qualify as measurable target lesions per RECIST . of\n which must be palpable or visualized by ultrasound and easily accessible to multiple\n intratumoral injections.\n\n - For patients with progressive disease (PD) while receiving anti-PD-/L therapy, must\n have documented PD per RECIST v. while receiving a prior anti-PD-/L therapy.\n\n Inclusion Criteria: Phase HNSCC patients\n\n - Histologically or cytologically confirmed recurrent or metastatic HNSCC that could not\n be treated with curative intent.\n\n - Have at least measurable target lesion per RECIST ., which must be accessible and\n amenable to multiple intratumoral injections.\n\n - Must have documented PD per RECIST v. while receiving a prior anti-PD-/L therapy.\n\n Exclusion Criteria: (Phase and Melanoma and HNSCC patients)\n\n - Received systemic chemotherapy or biological cancer therapy (except anti-PD-/L\n therapy) within weeks prior to study enrollment.\n\n - Received prior radiotherapy within weeks of start of study therapy.\n\n - Received small molecule inhibitor targeted therapy, such as tyrosine kinase\n inhibitors, within weeks prior to study enrollment.\n\n - Diagnosis of immunodeficiency or is receiving systemic steroid therapy or any other\n form of immunosuppressive therapy (including immune modulators or systemic\n corticosteroids) within days prior to study enrollment\n\n - Is expected to require any other form of anti-cancer therapy while in the trial.\n\n - Positive for hepatitis B, hepatitis C, or human immunodeficiency virus (HIV).\n\n - History of or current uveal or ocular melanoma.\n\n - Active infection including cytomegalovirus.\n\n - Active autoimmune disease requiring systemic treatment in the past years or a\n disease that requires immunosuppressive medication. Replacement therapy is not\n considered a form of systemic treatment.\n\n - Current pneumonitis or history of (non-infectious) pneumonitis that required steroids.\n\n - Known active central nervous system metastases or carcinomatous meningitis.\n\n - Use of any investigational agent within the last days prior to study enrollment.\n\n - Has received a live-virus vaccination within days of planned treatment start.\n Seasonal flu vaccines that do not contain live virus are permitted.\n\n - Any known additional malignancy that is progressing or requires active treatment,\n except for melanoma and HNSCC.\n\n Exclusion Criteria (Phase , Melanoma Expansion Cohorts and only)\n\n - Any prior combination therapy targeting immunoregulatory receptors or mechanisms and\n an anti-PD-/L agent or an investigational agent targeting immunoregulatory receptors\n\n - Prior therapy with an anti PD /L agent\n\n Exclusion Criteria: (Phase , Melanoma Expansion Cohort only)\n\n Any prior combination therapy involving agents given by intratumoral injection that\n target the innate immune pathway or system.\n\n Exclusion Criteria: (Phase , HNSCC Expansion Cohorts and only)\n\n - Prior therapy with an anti PD /L agent\n\n - Require treatment on anticoagulation therapy.\n\n Exclusion Criteria (Phase , HNSCC Expansion Cohorts and only)\n\n - Any prior combination therapy involving agents given by intratumoral injection that\n target the innate immune pathway or system.\n\n - Require treatment on anticoagulation therapy Patient must have previously received one (but no more) line of previous therapy with an anti-PD-/PD-L mAb therapy either alone or in combination and have either progressed or responded and then stopped responding. Patients must have previously received at least one line (and not more than lines) of previous therapy with an anti-PD-/PD-L mAb therapy, either alone or in combination, and have either progressed or responded and then stopped responding. Previous treatment with a PD- or PD-L inhibitor with documented progression of disease on most recent computed tomography (CT) scan; progression of disease is defined as ) the appearance of a new measureable lesion (> mm) on cross-sectional imaging or physical exam OR ) enlargement of previously detected lesions on two consecutive imaging studies OR ) enlargement of a previously detected lesion with correlative symptomatology on one cross-sectional imaging study; patients remain eligible if they had a previous response to a PD- inhibitor, including patients who had a complete response, partial response or stable disease; primary progressing patients are defined as those who received anti-PD- therapy within months of study enrollment; patients with relapsed disease are defined as those who received their last dose of PD- blocking antibody >= months prior to enrollment Patients who received adjuvant PD- therapy who then develop measurable disease are eligible; however, they must have received their last dose of PD-/PD-L blockade within two months of enrollment in this trial; they will be stratified with patients who have progressive disease Previously treated with a PD-/PD-L-blocking antibody or a histone deacetylase inhibitor Have available evaluable archival tumor tissue for PD-L biomarker assessment; presence of PD-L antigen on tumors is NOT required for study entry Grade or major organ immune-related adverse events (IRAEs) following treatment with anti-PD-/PD-L Phase : Patients with histologically or cytologically confirmed diagnosis of one of the following and with progressive disease during or after treatment with a PD- or PD-L-inhibitor: For Cohort A: Subjects who have radiographically confirmed disease progression during or following treatment with an anti-PD-/PD-L based therapy; Documented disease refractory to at least one PD/PD-L (+/- CTLA-) inhibitor treatment, or intolerance to these drugs Meet criteria for either the acquired resistance OR the suboptimal benefit cohort\r\n* Acquired resistance is defined as (must both be met):\r\n** Prior benefit from anti-PD-/PD-L therapy defined as a) prior response, and/or b) ? months of stable disease (SD); intervening therapies are allowed\r\n** Progressive disease (PD) on recent scans\r\n* Suboptimal benefit is defined as (must both be met):\r\n** Prolonged stable disease ? months OR suboptimal response (> % & < % shrinkage per Response Evaluation Criteria in Solid Tumors [RECIST] at any evaluation timepoint) \r\n** Ongoing stable disease on recent scans\r\n** Last treatment with an anti-PD-/PD-L agent within weeks prior to starting protocol treatment Previous treatment with a PD-, PD-L or CTLA- targeted therapy. Patients with prior treatment with PD- or PD-L inhibitor Disease progression on prior PD-/PD-L therapy in any line. Subjects must have received a minimum of doses of anti-PD-/PD-L therapy. If subjects have received fewer than doses of anti-PD-/PD-L therapy, documented radiologic progression and sponsor approval is necessary prior to inclusion. days for prior PD- therapy. Prior treatment with a combination of cetuximab and a PD-/PD-L inhibitor; prior treatment with cetuximab or a PD-/PD-L inhibitor is allowed as long as not previously given in combination Must be pembrolizumab/nivolumab refractory/resistant defined as having received at least doses of pembrolizumab (or doses of nivolumab) with documented systemic disease progression on staging imaging; progressive disease (PD) will be defined as increase in tumor burden > % relative to nadir (minimum recorded tumor burden) by Response Evaluation Criteria in Solid Tumors (RECIST) version (v).; once PD is confirmed, initial date of PD documentation will be considered as the date of disease progression; patients can be enrolled at any time following initiation of PD- therapy up to year Patients receiving PD- therapy whose disease is responding or stable (as defined by RECIST v.) Subjects may already be receiving PD-(L) (including pembrolizumab or other PD-[L] inhibitors such as nivolumab, atezolizumab, avelumab, durvalumab) for the treatment of systemic disease; systemic disease must be in complete remission or be stable by RECIST .; a washout period of at least weeks is required from the last dose of PD-(L) inhibitor Has previously progressed on a PD- or PD-L checkpoint inhibitor for systemic disease Documented progression of disease after initiation of therapy with OR lack of response to therapy with a PD-- or PD-L-targeting monoclonal antibody (pembrolizumab, nivolumab, etc) after at least weeks; NOTE: This treatment could have been at any time prior to registration Prior systemic therapy directed at MIBC prior systemic therapy directed at non-muscle invasive disease (i.e. superficial bladder cancer [T]) is permitted provided treatments within this studys exclusion criteria were not used (cisplatin, anti-PD) / anti-PD-L antibodies, etc.) Previous treatment with PD- or PD-L directed therapy Administration of a PD- or PD-L inhibitor within days prior to study registration For patients who discontinued PD- or PD-L inhibiting therapy during response to therapy, disease progression must have occurred following at least weeks of re-treatment with PD- or PD-L inhibiting therapy Determination by the treating medical oncologist that the patient is a candidate to continue the PD- or PD-L inhibiting therapy that the patient was receiving at the time of the most recent progression Other anti-cancer therapy administered between the time of tumor response to PD- or PD-L therapy and time of study enrollment\r\n* Note: Patients treated with a combination of PD- or PD-L inhibiting therapy and other immunotherapy are eligible; patients taking hormonal anti-cancer therapies or steroids for central nervous system (CNS) edema management that, in the opinion of the investigator, are appropriate to continue are eligible Any prior PD-/PD-L therapy-related adverse events (AE) that, in the opinion of the investigator, warrants exclusion from participation in this trial Participant must have histologically confirmed hepatocellular cancer (HCC) that is advanced or metastatic and have archival tissue available for PD-L, PD-L testing (NOTE: if participant has had prior radiotherapy to the liver, a mandatory fresh biopsy will need to be obtained since radiotherapy could affect PD-/PD-L immune status) Prior therapies for extracranial metastatic melanoma including chemotherapy, BRAFi/MEKi, cytokine or vaccine therapy as long as it did not include PD-/PD-L Patients must have received platinum-based therapy with or without bevacizumab, but may not have received a PD-, PD-L or PD-L inhibitor Subjects must have progressed on or after previous platinum-based chemotherapy; subjects must have also progressed on or after receiving any single-agent PD- or PD-L inhibitor (including pembrolizumab) as their most recent therapy and must have had at least a -month PFS on this therapy Subjects must be enrolled on the trial within weeks of their last infusion of PD- or PD-L inhibitor therapy Treatment with any investigational agent within days prior to registration for protocol therapy with the exception of PD- or PD-L inhibitors History of an immune-related toxicity requiring treatment with corticosteroids during prior PD-/ PD-L inhibitor treatment ADDITIONAL INCLUSION CRITERION FOR COHORT (PD-/PD-L INHIBITOR-NAIVE, CETUXIMAB-NAIVE) AND COHORT (PD-/PD-L INHIBITOR-REFRACTORY, CETUXIMAB-NAIVE): ADDITIONAL INCLUSION CRITERION FOR COHORTS AND (PD-/PD-L INHIBITOR-REFRACTORY): PD-/PD-L inhibitor-refractory patients must have documented disease progression after prior response to anti-PD-/PD-L therapy (response defined as stable disease, partial or complete response) ADDITIONAL EXCLUSION CRITERION FOR COHORTS (PD-/PD-L INHIBITOR-NAIVE, CETUXIMAB-NAIVE) AND (CUTANEOUS): Prior treatment of PD- or PD-L-directed immune checkpoint blockade is permitted if treatment was not discontinued due to disease progression or life-threatening adverse events per the investigators discretion (laboratory abnormalities alone with prior therapy will not exclude patients from this trial) Arm A: patients must be treatment naive to single agent PD-/PD-L inhibitors including but not limited to durvalumab, pembrolizumab, atezolizumab, nivolumab, and avelumab\r\n* Arm B: patients tumor must be either refractory to or progressed on one of the above agents\r\nNOTE: Patients must be eligible to receive the next line of therapy and not be suspected of having pseudoprogression\r\n* Both cases are defined by initial progressive disease (PD) or PD after CR, PR, or SD using RECIST criteria, respectively Arm B: patients must not have had prior exposure to combination treatment with PD-/PD-L inhibitors and another systemic treatment\r\n* NOTE: radiation therapy and surgery do not count as combination treatment Patients who are intolerant to PD-/PD-L inhibitors and/or metformin are excluded No treatment with prior sipuleucel-T, PD- inhibitor, MPDLA or any other PD-L inhibitor, taxane-based chemotherapy for metastatic disease Prior treatment with ibrutinib or an anti-PD-, or PD-L or PD-L agent or ipilimumab in the metastatic setting Dose escalation cohorts: Patients with histologically or cytologically confirmed diagnosis of malignancy (including lymphoma) with demonstrated progression of a tumor for whom there is no available therapy likely to convey clinical benefit AND who have not been previously treated with a PD-/PD-L inhibitor. These patients do not require measurable disease Dose expansion cohorts: Patients with histologically or cytologically confirmed diagnosis of of specified tumors with measurable disease per RECIST . or Lugano criteria. Some patients may have been previously treated with a PD- or PD-L inhibitor Prior treatment with an agent that blocks the PD-/PD-Lpathway Prior exposure to PD- or PD-L inhibitors is not allowed Participant must have an advanced solid tumor and must not be a candidate for surgical resection or other approved therapeutic regimen known to provide clinical benefit. For dose escalation, the participant may have been previously treated with a programmed cell death (PD-I) targeting agent. For dose expansion, the participant must be PD-I/PD-L targeting agent nave. For Combination, the participant must be have SCLC with progressive disease and have failed platinum containing therapy and be PD-/PD-L targeting agent nave. Have a PD-L positive (either strongly or weakly) tumor as determined by the IHC C pharmDx test at the study site; if a patients initial tumor specimen is not classified as PD-L positive by the central laboratory, a newly obtained specimen (different from the sample previously submitted) may be submitted for testing; if the newer specimen is classified as PD-L positive by the study site, the patient meets this eligibility criterion Prior treatment for CLL with CTLA-, PD-, PD-L, or CD monoclonal antibody (mAb) For Phase b LY monotherapy or combination therapy, no prior treatment with a PD- or PD-L agent is allowed. Patients who have had prior systemic therapy with a PD- blocking antibody will be excluded Grade or major organ immune-related adverse events (IRAEs) following treatment with anti PD-/PD-L Prior PD-- or PD-L-directed therapy or any therapeutic cancer vaccine. Prior treatment with specific pathway-blockers (PD-/PD-L) Patients who have been treated with prior PD- and PD-L agents Consent to baseline metastatic and progressive disease biopsy (of metastatic/progressing lesion) for enabling biomarker assessment and treatment assignment (at each time point baseline, PD, PD, PD) as well as for correlative studies\r\n* Consent to baseline and serial blood draws for plasma/serum/whole blood banking for correlative studies Patients can be either ipilimumab nave or refractory to ipilimumab, defined as received at least two doses of ipilimumab and documented disease progression; patients who were re-treated with ipilimumab and patients who were on maintenance ipilimumab will be allowed to enter the trial as long as there is documented progressive disease (PD); progressive disease will be defined as increase in tumor burden > % relative to nadir (minimum recorded tumor burden) which is confirmed by repeat assessment no less than four weeks from the date of the first documented PD; once PD is confirmed, initial date of PD documentation will be considered as the date of disease progression; prior ipilimumab therapy must have been completed at least weeks before study drug administration Has had prior treatment with any other anti-PD- or PD-L or PD-L agent or an antibody targeting other immune-regulatory receptors or mechanisms; examples of such antibodies include (but are not limited to) antibodies against indoleamine , -dioxygenase (IDO), PD-L, interleukin- receptor (IL-R), glucocorticoid-induced TNFR family related gene (GITR); prior ipilimumab, interleukin- (IL), bevacizumab and adoptive cell therapy is allowed Phase II PD-/PD-L refractory subsets: Patients with confirmed disease progression within year following initiation of PD-/PD-L inhibitor therapy (patients must have received at least doses of the PD-/PD-L inhibitor). No prior cytotoxic therapy in the advanced setting is permitted. BRAF inhibition therapy is acceptable before immunotherapy where clinically indicated. CTLA--inhibition therapy is acceptable as a prior line of therapy or in combination with anti-PD- therapy. Prior history of or active interstitial lung disease or pneumonitis, encephalitis, seizures, severe immune related adverse events with prior PD-/PD-L containing treatments; Received prior therapies targeting PD- or PD-L Newly diagnosed, metastatic NSCLC with a PD-L TPS ? % (as determined by central lab using the PD-L IHC C pharmDx kit) NOTE: Subjects with documentation of PD-L TPS ? % by IHC analysis using the C pharmDx kit will not require repeat PD-L testing by central laboratory; and Subjects with progression on or after first-line platinum-based chemotherapy who have a PD-L TPS ? % (as determined by central laboratory using the PD-L IHC C pharmDx kit). Subjects with EGFR or ALK genomic tumor aberrations with progression on FDA-approved therapy for these aberrations are eligible NOTE: Subjects with documentation of PD-L TPS ? % by IHC analysis using the C pharmDx kit will not require repeat PD-L testing by central laboratory; Prior chemotherapy, immunotherapy, radiotherapy or major surgery (including radiation therapy or surgery for treatment of brain metastases) must be completed at least weeks before study entry; prior PD- or PD-L therapy is acceptable Patients whose tumors have PD-L expression in >= % of tumor cells must have demonstrated progression on or intolerance to pembrolizumab; otherwise, patients who are eligible to receive an FDA-approved anti-PD-/anti-PD-L agent as second-line therapy must also have demonstrated progression on or intolerance to the drug PD on first-line therapy. Has received prior treatment with PD- or low-dose cytarabine. With the exception of CRPC and mBC patients, patients should have received prior PD- / PD-L-containing checkpoint inhibitor therapy administered as their most recent therapy and have failed to achieve a PR or CR within four () months of starting that therapy; PD- / PD-L checkpoint inhibitor therapy is permitted; Experienced PD during participation in another Valor study Enrolled patients may be candidates for standard of care therapy with trabectedin or second line/subsequent line treatment for advanced disease with PD-/PD-L inhibitor monotherapy; otherwise they should have no standard of care option available or be felt appropriate for a phase I clinical trial in the opinion of the treating investigator; prior PD-/PD-L exposure is not an exclusion criteria Prior treatment with an agent that blocks PD-/PD-L pathway or other immune modulating agents within fewer than weeks of half-lives Patients are excluded if they have a history of prior treatment with ipilimumab, CTLA- inhibitor or agonist, nivolumab, PD- or PD-L inhibitor Prior PD-- or PD-L-directed therapy. Patients must have received or be ineligible for platinum based chemotherapy and must have received at least one line of therapy with a PD-L or PD- targeting agent Subjects must have had clinical benefit while on a PD- or PD-L inhibitor defined as at least a month PFS, and now have disease progression. Most recent PD- or PD-L inhibitor infusion must be completed at least weeks of randomization. The subject must have recovered from all reversible acute toxic effects (other than alopecia) to =< grade or baseline. Previous discontinuation from PD- or PD-L due to an adverse event. Prior treatment with a PD-, PD-L, or PD-L blocking therapy Current or history of systemic autoimmune disease requiring systemic therapy, including significant autoimmunity associated with prior ipilimumab therapy or therapy with antibodies to PD- or PD-L Subjects must have a tumor sample that is adequate for PD-L assessment prior to randomization. Subjects may not have been previously treated with talimogene laherparepvec, any other oncolytic virus, pembrolizumab, or any other inhibitor of PD-, PD-L, or PD-L. Subject has previously been treated with a HDAC inhibitor, PD- inhibitor, PD-L inhibitor, PD-L inhibitor, CTLA- inhibitor, or any other antibody or drug specifically targeting T-cell costimulation or immune checkpoint pathways Unless unavailable, must have received at least one of cabozantinib or nivolumab (or other active anti-PD-/PD-L therapy) Must have disease progression on a prior PD--pathway targeted agent. Must have had documented disease progression while on a prior PD- pathway-targeted agent. b. In Part SA, patients with an inadequate response to anti-PD- mAb therapy, defined as SD or PD using RECIST v. criteria following at least months of therapy. Patients with PD have a tumor measurement increase of < fold from the time of starting anti-PD- therapy, must not have worsening of Eastern Cooperative Oncology Group (ECOG) performance status due to their disease progression, and cannot have new CNS lesion. Patients must also meet the lactic acid dehydrogenase (LDH) or ECOG status. No tumor size criteria are used in Part SA. Participants without a PD-L test result are eligible for the study Subject who received any prior monoclonal antibodies against PD- or PD-L and/or any prior: Prior therapies targeting PD- or PD-L. Subjects who fail to meet enrollment criteria for other PD- or PD-L trials solely due to low or negative predictive biomarkers. No prior CTLA- or PD-/PD-L therapy for the treatment of metastatic disease Prior therapy with PD-/PDL- inhibitors is allowed provided any toxicity attributed to prior PD-- or PD-L-directed therapy did not lead to discontinuation of therapy. Patients must have symptomatic or radiographic progression during or after treatment with a PD-(L) inhibitor administered either as monotherapy or in combination. Patients who have received prior anti-cancer therapy (e.g., biologic or other targeted therapy, chemotherapy) within weeks prior to registration; hormone therapy is permitted until registration\r\n* Note: patients who received prior anti-PD-, PD-L or PD-L agents are still eligible; a wash-out period of weeks prior to registration is required Prior use of lenalidomide, or monoclonal antibodies against CTLA-, PD-, or PD-L. Prior treatment with atezolizumab or another PD-L/PD- therapy Has received one prior systemic therapy regimen for metastatic renal cell carcinoma (mRCC) directed against PD- and/or PD-L which must have been the most recent regimen\r\n* Prior high-dose interleukin- therapy is permitted in addition to anti-PD(L) therapy, but is not required\r\n* Prior bevacizumab or vascular endothelial growth factor (VEGF) tyrosine kinase inhibitor (TKI) is permitted either in combination with anti-PD(L) therapy OR as monotherapy when given PRIOR to anti-PD(L) therapy\r\n* Prior treatment with combined ipilimumab and nivolumab is permitted\r\n* Prior axitinib in any setting is not permitted Particpant has received prior therapy with any other anti-PD-, or PD-L or PD-L agent or an antibody targeting other immuno-regulatory receptors or mechanism, including participation in any other pembrolizumab trial and treatment with pembrolizumab. a. Examples of such antibodies include (but are not limited to) antibodies against indoleamine ,-dioxygenase (IDO), PD-L, IL-R, glucocorticoid-induced tumor necrosis factor receptor (GITR). Part B: Anti-PD- non-responders are defined as those showing disease progression according to RECIST v. after at least weeks of therapy with a PD- antibody either alone or in combination with approved checkpoint inhibitor or targeted therapies according to their label; there is no serological requirement Nonresponsive to most recent therapy (stable disease only or PD while on treatment), or ONLY FOR PART B PD-L selection should a PD-L expression threshold have been defined in Part A and potentially additional mesothelioma trial data; there will be no PD-L/biomarker selection for Part A Prior therapy with a PD-, PD-L, or CTLA- inhibitor or a lung cancer-specific vaccine therapy Prior systemic therapy targeting PD-: PD-L axis. Has received prior therapy with compounds targeting programmed death (PD)-, PD-L, PD-L, or a mitogen-activated protein kinase (MAPK) pathway inhibitor Have documented objective radiographic or clinical disease progression after PD-/PD-L +/- anti-CTLA- inhibitor therapy (melanoma) or after at least line of chemotherapy for metastatic disease (TNBC) Has received prior therapy with PD-, PD-L, or CTLA- inhibitor Ten patients with a diagnosis of NSCLC who have disease progression per investigator's assessment who are on anti PD- or PD-L therapies will be allowed to enroll in the phase II part of this study but must be switched to treatment per this protocol Patients who have had chemotherapy or radiotherapy within days prior to entering the study; patients may not be currently receiving any other investigational agents or immunomodulatory agents (e.g. ipilimumab); patients treated with prior PD- or PD-L directed therapies are ineligible for the phase I portion For Part b: Must have documented confirmed disease progression on a prior PD- pathway targeted agent or must be PD- pathway-targeted treatment nave. Subjects who have received prior therapy with regimens containing CTLA-, PD-L, or PD- antagonists may be permitted to enroll under certain conditions Previously treated with a histone deacetylase inhibitor (i.e., vorinostat, belinostat, romidepsin, panobinostat), PD-/PD-L-blocking antibody (i.e., atezolizumab, nivolumab, pembrolizumab), or a cytotoxic T-lymphocyte associated protein- (CTLA-) agent All patients must have received at least one line of systemic therapy in the metastatic setting; prior immunotherapy is allowed, including prior treatment with nivolumab, another PD- inhibitor, or a PD-L inhibitor, as long as the reason for discontinuation of a prior PD- pathway inhibitor was not for drug-related toxicity Subject has received PD-/PD-L blockade or has been informed of the results of relevant positive Phase trials with these agents. Cohort (combination of niraparib and PD- inhibitor): patients must have tumors with high PD-L expression (TPS ? %) per local assessment; with no known EGFR sensitizing mutation and/or ROS- or ALK translocations, and no prior systemic chemotherapy or PD-/PD-L inhibitor treatment for metastatic NSCLC Cohort (combination of niraparib and PD- inhibitor): patients must have tumors with PD-L expression (TPS between % and %) per local assessment, with no known EGFR-sensitizing mutation and/or ROS- or ALK translocation, and no prior systemic chemotherapy or PD-/PD-L inhibitor treatment for metastatic NSCLC Cohort (single agent niraparib): patients must have metastatic sqNSCLC and have progressed after both prior platinum-based chemotherapy and prior PD- or PD-L inhibitor treatment Prior treatment with an agent that blocks the PD-/PD-L pathway Prior treatment with ibrutinib, a PD- inhibitor, a PD-L inhibitor, or a CTLA- inhibitor Has had treatment a prior monoclonal antibody targeting PD-, PD-L, PD-L, or CTLA- Previous treatment with eribulin mesylate or any anti-PD-, PD-L, or PD-L agent or participation in any MK- Merck studies Patients must NOT have received any class of drugs targeted to the PD-/PD-L pathway Melanoma (anti-PD-/PD-L therapy nave or pre-treated) Non small cell lung cancer (anti-PD-/PD-L therapy nave or pre-treated) Renal Cell Carcinoma (anti-PD-/PD-L therapy nave or pre-treated) Prior participation in an interventional, investigational cancer vaccine or immunotherapy study except for an anti-PD-/PD-L study. No prior treatment with agents targeting EGFR mutation, ALK rearrangement, and PD-/PD-L/CTLA- Previous treatment with rociletinib or MPDLA, or other rd generation EGFR TKI (eg, AZD-, HM), or PD axis targeted therapy (eg, anti PD or anti-PD L) Prior exposure to PD- or PD-LI treatment Has received prior treatment with PD-/PD-L pathway inhibitors in the adjuvant setting Prior treatment with a check-point inhibitor targeting PD-, unless not a candidate. Previous exposure to CD, PD-, PD-L, CTLA- antibodies or any other immunomodulatory agent Group D only: Patients who have received only one prior systemic therapy treatment consisting of a PD- and/or PD-L inhibitor with or without a CTLA inhibitor for NSCLC, with exception of neo-adjuvant or adjuvant therapy as depicted in inclusion criterion . The last dose of prior immunotherapy must have been administered at least weeks prior to the start of study treatment (cycle day ). Prior therapy with an agent that blocks the PD-/PD-L pathway Progressive Disease (PD) during prior aromatase inhibitor (AI) therapy. No evidence of PD for ? months before the first dose of study drug.