This randomized phase II trial studies how well regorafenib works in treating patients with cancer of the esophagus or gastroesophageal junction that has spread from where it started to nearby tissue or lymph nodes and have completed chemoradiation therapy and surgery. Regorafenib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth.