Exotic excitations arise at the interface between a three-dimensional topological insulator (TI) and superconductors. For example, Majorana fermions with a linear dispersion, E ∼ k, exist in a short π Josephson junction on the TI surface. We show that in these systems, the Andreev bound states spectrum becomes nearly flat at zero energy when the chemical potential is sufficiently away from the Dirac point. The flat dispersion is well approximated by E ∼ k N , where N scales with the chemical potential. Similar evolution from linear to flat dispersion also occurs for the subgap spectrum of a periodic superconducting proximity structure, such as a TI surface in contact with a stripe superconductor.