RNA molecules form a sequence-specific self-pairing pattern at low temperatures. We analyze this problem using a random pairing energy model as well as a random sequence model that includes a base stacking energy in favor of helix propagation. The free energy cost for separating a chain into two equal halves offers a quantitative measure of sequence specific pairing. In the low temperature glass phase, this quantity grows quadratically with the logarithm of the chain length, but it switches to a linear behavior of entropic origin in the high temperature molten phase. Transition between the two phases is continuous, with characteristics that resemble those of a disordered elastic manifold in two dimensions. For designed sequences, however, a power-law distribution of pairing energies on a coarse-grained level may be more appropriate. Extreme value statistics arguments then predict a power-law growth of the free energy cost to break a chain, in agreement with numerical simulations. Interestingly, the distribution of pairing distances in the ground state secondary structure follows a remarkable power-law with an exponent -4/3, independent of the specific assumptions for the base pairing energies.