Why are neutron stars mostly composed of neutrons? I understand that it is due to electron capture $(p + e \rightarrow n + v_e)$. My precise question is:
What are the conditions needed for a star core to start undergoing this process at a large scale? 
 A: The combined rest mass of a proton and an electron is less than that of a neutron. Fundamentally then, what you need to start turning a star into a neutron star is that the protons and electrons need kinetic energy as well as rest mass energy.
How much energy: Well at a minimum (assuming the neutrino doesn't get much), then an electron interacting with a proton at rest would need $(m_n - m_p)c^2 = 1.29 MeV$ of total energy (remember the electron has at least 0.51 MeV of rest mass energy). 
If the total energy is 1.29 MeV and the rest mass is 0.51Mev, we immediately see we need relativistic electrons.
But that is not sufficient. If we just create neutrons in the reaction you suggest, there is nothing to stop them decaying back into protons and electrons (and anti-neutrinos), and this would be energetically favourable.
The key is that the electrons need to be both relativistic and degenerate. If there is a sufficient density of degenerate electrons, then the Fermi energy can be high enough to reach the threshold of neutronisation. Conversely, if the Fermi energy is this high, then this also has the useful property of blocking the beta-decay pathway for the neutrons. This is because the maximum decay energy of any electron produced will be approximately the Fermi energy. As all lower energy states are filled, then few beta decays can occur.
Neutronisation of protons that are inside nuclei takes rather higher threshold energies, so the electrons really do have to be quite relativistic - about 5MeV to neutronise iron for instance. This takes densities of around $10^{12}$ kg/m$^3$. These densities are reached at core masses of about $1.2M_{\odot}$. Contrary to common belief, the Chandrasekhar mass is not and never was a fixed $1.445M_{\odot}$. That figure is appropriate for a carbon gas and ignores neutronisation (and GR). The limit is considerably lower for an iron core. Once the neutronisation threshold is reached it destabilises the core by removing degenerate electrons that previously provided the pressure support. The core collapse -> supernova.
So you need relativistically degenerate electrons, but wait, it gets a little more complicated inside a neutron star, where the electrons, protons and neutrons are all degenerate fermion gases.
Then, it is not sufficient to create a neutron with zero kinetic energy. You need to create one with an energy that exceeds the neutron Fermi energy. A rather simple bit of physics where you minimise the energy density of the gas, subject to charge neutrality and baryon conservation gives you the deceptively simple beta/inverse beta equilibrium condition that
$$ E_{F,n} = E_{F,p} + E_{F,e}$$
This condition means that that there are always some protons and electrons in a neutron star (about 1 in a 100 for typical neutron star densities). The Fermi energy of the electrons can reach 100 MeV near the core because this is the threshold for neutronisation at these densities.
EDIT: Just for fun, I solved the above equation for a range of densities. The Fermi energies of the neutrons, protons and electrons are show below. For reasons explained above, the Fermi energy of the electrons is the threshold energy for neutronisation. For the typical density near the core of a neutron star, the Fermi energy of the electrons is about 115 MeV.  CAVEATS: This assume ideal degenerate gases. At densities above a few $10^{17}$ kg/m$^3$ this cannot be true and the strong nuclear force between nucleons becomes important. Also at densities approaching $10^{18}$ kg/m$^3$ muons and then possibly even hyperons are produced. Both of these modify the electron Fermi energy in detail, but not by more than a small numerical factor.

A: The minimum mass for one to form is 1.44 solar masses.
Energy barrier:
Neutron mass - 1
Proton mass - 0.99862349
Electron mass - 0.00054386734
$p+e→n+v_e$
Assuming that the neutrino mass is negligible, we get the difference between the neutron mass and the electron-proton mass to be 780 keV, meaning this is the energy barrier.
