This phase I trial is studying the side effects and best dose of erlotinib hydrochloride when given together with cetuximab and to see how well they work in treating patients with advanced gastrointestinal cancer, head and neck cancer, non-small cell lung cancer, or colorectal cancer. Erlotinib hydrochloride may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Monoclonal antibodies, such as cetuximab, can block tumor growth in different ways. Some block the ability of tumor cells to grow and spread. Others find tumor cells and help kill them or carry tumor-killing substances to them. Erlotinib hydrochloride and cetuximab may also stop the growth of tumor cells by blocking blood flow to the tumor. Giving erlotinib hydrochloride together with cetuximab may kill more tumor cells.