Chemoradiation and Pembrolizumab Followed by Pembrolizumab and Lenvatinib Before Surgery for the Treatment of Non-metastatic Esophageal or Esophageal/Gastroesophageal Junction Cancer

This phase II trial studies the effect of chemoradiation and pembrolizumab followed by pembrolizumab and lenvatinib before surgery in treating patients with esophageal or esophageal/gastroesophageal junction cancer that has not spread to other places in the body (non-metastatic). Pembrolizumab is an immunotherapy drug that works by harnessing the immune system to attack cancer. Lenvatinib is an anti-cancer drug that works by stopping or slowing down the growth of cancer cells. Chemotherapy drugs, such as carboplatin and paclitaxel, work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Radiation therapy uses high energy x-rays to kill tumor cells and shrink tumors. Giving chemoradiation and pembrolizumab followed by pembrolizumab and lenvatinib before surgery may kill more tumor cells.

PRIMARY OBJECTIVE:

I. To evaluate pathologic complete response rate (path CR) and complete clinical response rate (clinical CR) at 14 weeks after starting chemoradiotherapy.

SECONDARY OBJECTIVES:

I. To assess safety and tolerability of pembrolizumab and lenvatinib in this patient population.

II. To establish that pembrolizumab + lenvatinib will increase immune response via increased expression of the 18 gene pro-immune response signature measured using the Nanostring platform on tumor tissue biopsies.

III. To evaluate disease-free survival (DFS) and overall survival (OS) in this study population.

EXPLORATORY OBJECTIVES:

I. To identify through an integrated genomic sequencing approach (MHC-PepSeq) the presence of tumor mutations able to elicit neo-antigen-specific immunity in this population expected to be predominated by microsatellite stability (MSS) tumors.

II. To correlate temporal variations in circulating tumor deoxyribonucleic acid (ctDNA) representing immunogenic and non-immunogenic mutations as pharmacodynamic immune markers.

III. To correlate diversity in the gut microbiome with path CR and clinical CR in this study population.

OUTLINE:

CHEMORADIATION PHASE: Patients receive carboplatin intravenously (IV) and paclitaxel IV once a week (QW) for up to 6 weeks in the absence of disease progression or unacceptable toxicity. Patients also undergo external beam radiation therapy (EBRT) over 6 weeks and receive pembrolizumab IV over 30 minutes on day 1 of radiation therapy in the absence of disease progression or unacceptable toxicity.

WINDOW PERIOD: Patients receive pembrolizumab IV over 30 minutes on day 1 of week 3 and lenvatinib mesylate orally (PO) once daily (QD) at weeks 3-6 in the absence of disease progression or unacceptable toxicity.

SURGERY/SURVEILLANCE: Patients without complete response undergo standard of care surgical resection. Patients with complete response/pursue non-operative management undergo surveillance via periodic endoscopic biopsy.

After completion of study treatment, patients are followed up at 90 days, then for up to 3 years.

Eligibility Criteria:
Inclusion Criteria:

* Documented informed consent of the participant and/or legally authorized representative
* Agreement to allow the use of archival tissue from diagnostic tumor biopsies

  * If unavailable, exceptions may be granted only with study principal investigator (PI) approval
* Age \>= 18 years
* Eastern Cooperative Oncology Group (ECOG) =\< 1
* Non-metastatic cancer of the esophagus OR esophagus and gastroesophageal junction (GEJ; tumor extending =\< 2 cm into the stomach)
* Confirmed stage I (T1N1 only)-IVA diagnosis of one of the following:

  * Squamous cell; OR
  * Adenocarcinoma; OR
  * Mixed adenosquamous carcinoma
* Deemed appropriate for neoadjuvant chemoradiation by the multidisciplinary team (surgeon, medical oncologist, and radiation oncologist)

  * Chemotherapy defined as weekly carboplatin/paclitaxel; AND
  * Radiation defined as external beam radiotherapy defined as: 50.4 Gy as per institutional and national treatment guidelines
* Deemed appropriate for esophagectomy or repeat endoscopic biopsies if non-operative management is pursued
* Absolute neutrophil count (ANC) \>= 1500/mm\^3 (performed within 14 days prior to day 1 of study participation/ 1st endoscopic biopsy unless otherwise stated)
* Platelets \>= 100,000/mm\^3 (performed within 14 days prior to day 1 of study participation/ 1st endoscopic biopsy unless otherwise stated)
* Serum total bilirubin =\< 1.5 x upper limit of normal (ULN) OR direct bilirubin =\< ULN if total bilirubin levels \> 1.5 x ULN (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Aspartate aminotransferase (AST) =\< 2 x ULN (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Alanine aminotransferase (ALT) =\< 2 x ULN (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Creatinine =\< 1.5 x ULN OR for patients with creatinine \> 1.5 x ULN creatinine clearance of \>= 60 mL/min per 24 hour urine test or the Cockcroft-Gault formula (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* International normalized ratio (INR) or prothrombin time (PT) =\< 1.5 x ULN (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Activated partial thromboplastin time (aPTT) =\< 1.5 x ULN (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Female of childbearing potential only: Negative urine or serum pregnancy test. If the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required (performed within 14 days prior to day 1 of study participation/1st endoscopic biopsy unless otherwise stated)
* Agreement by women of childbearing potential (WOCBP) and males of childbearing potential to use an effective method of birth control or abstain from heterosexual activity for the course of the study through at least 120 days after the last dose of protocol therapy

  * Childbearing potential defined as not being surgically sterilized (men and women) or have not been free from menses for \> 1 year (women only)

Exclusion Criteria:

* Immune checkpoint inhibitor(s) (e.g. anti-PD-1, anti-CTLA4)
* Multi-tyrosine kinase inhibitor(s) (e.g. lenvatinib)
* Radiotherapy within 21 days prior to day 1 of study participation
* Investigational agent within 21 days prior to day 1 of study participation
* Live-virus vaccination within 30 days prior to day 1 of study participation
* Systemic cytotoxic chemotherapy, antineoplastic biologic therapy, or major surgery within 21 days of study participation
* Chronic systemic steroid therapy or on any other form of immunosuppressive medication
* Coumarin-based anticoagulants
* Unstable or untreated brain/leptomeningeal metastasis
* Clinically active diverticulitis, intra-abdominal abscess, gastrointestinal (GI) obstruction, or abdominal carcinomatosis (known risks factors for bowel perforation)
* Severe hypersensitivity reaction to treatment with another antibody and/or hypersensitivity to lenvatinib and/or any of its excipients
* Active autoimmune disease that has required systemic treatment in the past 2 years
* Known history of human immunodeficiency virus (HIV), hepatitis B or hepatitis C (with confirmation of negative hepatitis B surface antigen \[HBSAg\], hepatitis B virus \[HBV\] polymerase chain reaction \[PCR\], and hepatitis C virus \[HCV\] PCR)
* History of pneumonitis (non-infectious) that required steroids or current pneumonitis
* Known history of active tuberculosis
* Diagnosed with or treated for cancer within the previous two years, other than histologies listed in inclusion criteria or non-melanoma carcinoma of the skin
* Female only: Pregnant or breastfeeding
* Any other condition that would, in the investigator's judgment, contraindicate the patient's participation in the clinical study due to safety concerns with clinical study procedures
* Prospective participants who, in the opinion of the investigator, may not be able to comply with all study procedures (including compliance issues related to feasibility/logistics)