The flow of two superposed viscous fluid layers in a two-dimensional channel confined between a plane and a wavy or indented wall is studied by analytical and numerical methods at arbitrary Reynolds numbers. The interface between the two fluids may exhibit constant or variable surface tension due to an insoluble surfactant. The flow is computed from a specified initial condition using the immersed-interface method on a curvilinear grid constructed by conformal mapping. The numerical simulations illustrate the effect of geometrical nonlinearity and reveal that inertia may increase or decrease the amplitude of the interface profile at steady state depending on the flow parameters. Increasing either the Reynolds number or the wall amplitude above a certain threshold value provokes flow instability and overturning of the interface. In the Appendix, a linear perturbation analysis is performed for arbitrary Reynolds numbers on the assumption of small-amplitude sinusoidal undulations, and results for the amplitude and phase shift of the interfacial and surfactant concentration wave are documented for a broad range of flow conditions. It is found that inertia may have a mixed effect on the deformation and phase shift, while the surfactant promotes the deformation of the interface under most conditions.