We show that the interplay between excluded volume effects, hydrophobicity, and hydrogen bonding in a tubelike representation of a polypeptide chain gives rise to free energy landscapes that, in addition to a clear global minimum, are characterized by the general presence of a small number of metastable minima, which correspond to common structural motifs observed in proteins. The complexity of the landscape increases only moderately with the length of the chain. Analysis of the temperature dependence of these landscapes reveals that the stability of specific metastable states is maximal at a temperature close to the midpoint of folding. These mestastable states are therefore likely to be of particular significance in determining the generic tendency of proteins to aggregate into potentially pathogenic agents.