Pembrolizumab and Palliative Radiation Therapy in Treating Patients With Metastatic Esophagus, Stomach, or Gastroesophageal Junction Cancer

This phase II trial studies how well pembrolizumab and palliative radiation therapy works in treating patients with esophagus, stomach, or gastroesophageal junction cancer that has spread to other parts of the body. Monoclonal antibodies, such as pembrolizumab, may interfere with the ability of tumor cells to grow and spread. Palliative radiation therapy, such as external beam radiation therapy, uses high energy beams to treat symptoms that are caused by tumors. Giving pembrolizumab together with palliative radiation therapy may work better in treating patients with esophagus, stomach, or gastroesophageal junction cancer that has spread to other parts of the body.

PRIMARY OBJECTIVE:

I. To establish that the combination of pembrolizumab and traditional external beam multifractionated radiation therapy (RT) to the primary tumor or a single target metastatic site of patients with metastatic gastric, esophageal, and/or gastroesophageal junction (GEJ) cancers will lead to an increase in tumor infiltrating cytotoxic T-cells and circulating cytotoxic T cells and a reduction in immunosuppressive regulatory T cells (Tregs) and myeloid-derived suppressor cells (MDSCs) in metastatic sites.

SECONDARY OBJECTIVES:

I. To establish that the combination of pembrolizumab and RT is feasible in the patient population and evaluate toxicities per National Cancer Institute (NCI) Common Toxicity Criteria for Adverse Events (CTCAE) version (ver.) 4.03.

II. To evaluate overall response rate (ORR) per Response Evaluation Criteria in Solid Tumors (RECIST) 1.1 and immune related (ir)RECIST in this treatment population and correlate with tumor T-cell response.

III. To evaluate progression-free (PFS) and overall survival (OS) in this treatment population.

EXPLORATORY OBJECTIVES:

I. To measure changes in whole genome serum micro ribonucleic acid (miRNA) signature before and after protocol therapy and correlate with tumor/immune/stromal cell miRNA expression profiling determined by deep sequencing.

II. To measures changes in fecal and oral microbiomic diversity and correlative with ORR, PFS, and OS.

III. To assess germline mutations in a panel of miRNA regulatory genes using the MiraDx assay as predictors of response and toxicity to pembrolizumab and RT.

OUTLINE:

INITIAL TREATMENT: Patients undergo palliative external beam RT daily. On day 1, patients undergo the first RT fraction and then receive pembrolizumab intravenously (IV) over 30 minutes. Cycles repeat every 3 weeks for up to 35 cycles in the absence of disease progression or unacceptable toxicity.

SECOND PHASE: Patients who achieve a complete response, stop study treatment, and then experience radiographic disease progression may be eligible for the second phase at the discretion of the investigator if no cancer treatment was administered since the last dose of pembrolizumab and trial eligibility safety parameters are met. Patients receive pembrolizumab IV over 30 minutes on day 1. Cycles repeat every 3 weeks for up to 17 cycles in the absence of disease progression or unacceptable toxicity.

After completion of treatment, patients are followed up at 30 days, every 6 weeks for 1 year, and then every 9 and 12 weeks for up to 2 years.

Eligibility Criteria:
Inclusion Criteria:

* Documented informed consent of the participant
* Willing to provide tumor tissue amenable to ultrasound or computed tomography (CT)-guided biopsy for biomarker analyses

  * Patients with malignant ascites are permitted to participate and provide ascites samples for biomarker analyses
  * Patents receiving radiation to a single metastatic site in which only the primary tumor is accessible for biopsy by endoscopy will also be eligible
* Eastern Cooperative Oncology Group (ECOG) performance status of =\< 1
* Life expectancy of \>= 3 months
* Diagnosis of metastatic squamous cell carcinoma and/or adenocarcinoma of the esophagus, gastroesophageal junction, or stomach in need of palliative radiotherapy to the primary tumor or a single metastatic site for symptoms such as pain, dysphagia, and/or gastrointestinal bleeding

  * Patients with adenocarcinoma histology and known human epidermal growth factor receptor 2 (HER2) overexpressing disease are permitted to participate if the progressed or are intolerant of prior trastuzumab-containing therapy
* Measurable metastatic sites of disease outside of the target lesion undergoing palliative radiation based on RECIST 1.1 as assessed by the investigator
* Have no limits on prior lines of therapy or may be treatment-naive if in need of palliative RT provided the patient has not received prior anti-programmed cell death protein 1(PD-1), anti-programmed cell death 1 ligand 1 (PD-L1), or anti-programmed cell death 1 ligand 2 (PD-L2) therapy
* Absolute neutrophil count (ANC) \>= 1,500/mm\^3
* Platelets \>= 100,000/mm\^3
* Hemoglobin \>= 9 g/dL

  * May receive transfusion to meet this goal
* Total serum bilirubin =\< 1.5 x upper limit of normal (ULN) OR direct bilirubin =\< ULN if total bilirubin levels \> 1.5 x ULN
* Albumin \>= 2.5 mg/dL
* Aspartate aminotransaminase (AST) and alanine aminotransferase (ALT) =\< 2.5 x ULN OR =\< 5.0 x ULN if liver metastases present
* Serum creatinine =\< 1.5 x ULN OR creatinine clearance (if measured or calculated per institutional standard) \>= 60 mL/min if creatinine levels \> 1.5 x ULN

  * Glomerular filtration rate (GFR) can also be used in place of creatinine or creatinine clearance (CrCl)
* If not receiving anticoagulants: international normalized ratio (INR) OR prothrombin (PT) =\< 1.5 x ULN; if on anticoagulant therapy: PT must be within therapeutic range of intended use of anticoagulants
* If not receiving anticoagulants: activated partial thromboplastin time (aPTT) =\< 1.5 x ULN; if on anticoagulant therapy: aPTT must be within therapeutic range of intended use of anticoagulants
* Negative urine or serum pregnancy test (female of childbearing potential only)

  * If the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required
* Female of childbearing potential: willing to use 2 methods of birth control or be surgically sterile, or abstain from heterosexual activity for the course of the study through 120 days after the last dose of study medication

  * Childbearing potential defined as not being surgically sterilized or have not been free from menses for \> 1 year
* Male: use an adequate method of contraception starting with the first dose of study therapy through 120 days after the last dose of study therapy

Exclusion Criteria:

* Anti-PD-1, anti-PD-L1, or anti-PD-L2 agents
* Prior radiation therapy within the field of the target lesion that in the opinion of the treating radiation oncologist would preclude further palliative radiation to a dose of 30 gray (Gy)
* Anti-cancer monoclonal antibody (mAb) within 4 weeks prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to agents administered more than 4 weeks earlier
* Chemotherapy, targeted small molecule therapy, or radiation therapy within 2 weeks prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to a previously administered agent

  * Note: Subjects with =\< grade 2 neuropathy are an exception to this criterion and may qualify for the study
  * Note: If subject received major surgery, they must have recovered adequately from the toxicity and/or complications from the intervention prior to starting therapy
* Live vaccine within 30 days of planned start of study therapy

  * Note: Seasonal influenza vaccines for injection are generally inactivated flu vaccines and are allowed; however intranasal influenza vaccines (e.g., Flu-Mist) are live attenuated vaccines, and are not allowed
* Immunosuppressive therapy within 7 days prior to the first dose of trial treatment
* Investigational device within 4 weeks of the first dose of treatment
* Currently receiving an investigational agent
* About to undergo palliative radiation for a symptomatic central nervous system (CNS) metastasis
* Systemic steroid therapy
* Hypersensitivity to pembrolizumab or any of its excipients
* Diagnosis of immunodeficiency
* Active autoimmune disease that has required systemic treatment in the past 2 years (i.e., with use of disease modifying agents, corticosteroids or immunosuppressive drugs)

  * Replacement therapy (e.g., thyroxine, insulin, or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency, etc.) is not considered a form of systemic treatment
* Known history of, or any evidence of active, non-infectious pneumonitis
* Current active infection requiring systemic therapy
* Known history of active tuberculosis (TB), human immunodeficiency virus (HIV) 1/2, hepatitis B or hepatitis C
* Known additional malignancy that is progressing or requires active treatment

  * Exceptions include basal cell carcinoma of the skin or squamous cell carcinoma of the skin that has undergone potentially curative therapy or in situ cervical cancer
* Known active central nervous system (CNS) metastases and/or carcinomatous meningitis

  * Subjects with previously treated brain metastases may participate provided they are stable, have no evidence of new or enlarging brain metastases, and are not using steroids for at least 7 days prior to trial treatment; this exception does not include carcinomatous meningitis which is excluded regardless of clinical stability
* History or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the trial, interfere with the subject's participation for the full duration of the trial, or is not in the best interest of the subject to participate, in the opinion of the treating investigator
* Known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial
* Pregnant or breastfeeding (female only)