As I understand your question, the problem at hand is to solve the PDE for the minority carrier concentration:
$\dfrac{\partial p}{\partial t} = D_p\dfrac{\partial^2 p}{\partial x^2} + \dfrac{p_0 - p}{\tau_p}$
on the half-line $[0, \infty)$, subject to the initial condition:
$p(x, 0) = p_0$
And the boundary conditions:
$p(0, t) = p_0 + N_m$
Where $N_{m}$ is the excess minority carrier concentration due to the photoelectric effect (reference), and
$\lim_{x \to \infty} p(x,t) = p_0.$
To solve this, considering splitting the problem into the homogeneous PDE:
$\dfrac{\partial p}{\partial t} - D_p\dfrac{\partial^2 p}{\partial x^2} + \dfrac{p}{\tau_p} = 0 $
And the inhomogeneous PDE:
$\dfrac{\partial p}{\partial t} - D_p\dfrac{\partial^2 p}{\partial x^2} + \dfrac{p}{\tau_p} = \dfrac{p_0}{\tau_p}$.
Since the system is linear, if we have have a general solution to the homogeneous equation and a particular solution to the inhomogeneous equation, then if their sum satisfies the boundary conditons it will be a solution to the original problem.
It's easy to see that a particular solution to the inhomogeneous equation is $p(x,t)_p = p_0$.
Approaching the homogeneous PDE next, we can use the Laplace transform to find a general solution that satisfies the following BC and IC:
$p(0, t) = N_m$
$p(x, 0) = 0$, and
$\lim_{x \to \infty} p(x,t) = 0$.
Taking the Laplace transform:
$\int_0^{\infty}e^{-st}f(t)dt$
In the time variable of the PDE gives us the ODE:
$s\hat{p}(x) - \mathcal{L}(p(x, 0)) = D_p\dfrac{d^2\hat{p}(x)}{dx^2} - \dfrac{\hat{p}(x)}{\tau_p} \implies $
$\dfrac{d^2\hat{p}(x)}{dx^2} = \hat{p}(x)\left(\dfrac{s}{D_p} + \dfrac{1}{D_p \tau_p}\right) = $
$\dfrac{d^2\hat{p}(x)}{dx^2} = C_n\hat{p}(x)$, where
$ C_n = \left(\dfrac{s}{D_p} + \dfrac{1}{D_p \tau_p}\right)$.
The general solution to this equation can be found by standard ODE methods and has the form:
$\hat{p}(x) = C_1e^{\sqrt{C_n}x} + C_2e^{-\sqrt{C_n}x}$.
Since we only desire solutions that decay as $x \to \infty$, the first solution is nonphysical and $C_1 = 0$.
The initial condition $p(0) = N_m\implies \hat{p}(0) = \dfrac{N_m}{s} \implies C_2 = \dfrac{N_m}{s}$,
so the solution to the ODE in the S domain is:
$\hat{p}(x) = \dfrac{N_m}{s}e^{-\sqrt{C_n}x}.$
Approaching the right hand side first, with some help from Wolfram Alpha, we find that the inverse Laplace transform of the function $P(s) = \frac{A}{s}e^{-\sqrt{s + \alpha}{x}}$ is:
$\frac{1}{2}Ae^{-\sqrt{\alpha}x}\left(\mathrm{erf}\left(\frac{2\sqrt{\alpha}t - x}{2\sqrt{t}}\right)+ e^{2\sqrt{\alpha}x}\mathrm{erfc}\left(\frac{2\sqrt{\alpha}t + x}{2\sqrt{t}}\right) + 1\right)$ for $x > 0$,
where $\mathrm{erfc}(z) = 1 - \mathrm{erf}(z)$ is the complementary error function.
Our function $\hat{p}(x)$ is of the form $\frac{A}{\beta}\frac{1}{{\frac{s}{\beta}}}e^{-\sqrt{\frac{s}{\beta} + \alpha}{x}}$, so applying the scaling theorem:
$\mathcal{L^{-1}}(P(\frac{s}{\beta})) = \beta p(\beta t)$ we finally get:
$\mathcal{L^{-1}}(\hat{p}(x)) = p(x,t)_h = \frac{1}{2}N_me^{-\sqrt{\alpha}x}\left(\mathrm{erf}\left(\frac{2\sqrt{\alpha}t\beta - x}{2\sqrt{t\beta}}\right)+ e^{2\sqrt{\alpha}x}\mathrm{erfc}\left(\frac{2\sqrt{\alpha}t\beta + x}{2\sqrt{t\beta}}\right) + 1\right)$,
where $\alpha = \frac{1}{D_p\tau_p}$, $\beta = D_p$, and the subscript "h" in $p(x,t)_h$ indicates that this is the homogeneous solution.
Summing the particular and homogeneous solution we get:
$p(x,t)_h + p(x,t)_p = p(x,t) = \frac{1}{2}N_me^{-\sqrt{\alpha}x}\left(\mathrm{erf}\left(\frac{2\sqrt{\alpha}t\beta - x}{2\sqrt{t\beta}}\right)+ e^{2\sqrt{\alpha}x}\mathrm{erfc}\left(\frac{2\sqrt{\alpha}t\beta + x}{2\sqrt{t\beta}}\right) + 1\right) + p_0$,
which satisfies the conditions of the original problem. It should be straightforward to take the limit of this expression as $t \to \infty$.
But why when I connect a volt-meter across the whole diode will I not see this built in potential?
Because at equilibrium (V=0) the Fermi-level throughout the whole device is flat. A voltage will only exist when there is a gradient in Fermi-level over the component (i.e. a voltage drop).
Edit
Maybe a more visual explanation would help? Think of the Fermi-level as the height of water in two buckets. The first bucket on the left has a very low water level, the second bucket on the right has a very high water level. P-doped semiconductor have a Fermi-level close to the valence band so this is represented by the left bucket. N-dopded semiconductors have a Fermi-level very close to the conduction band, this is represented by the very high water level in the right bucket. We now connect the buckets together with a pipe and the water level equilibrates.
| | |~~~~~~~~| | | | |
| | | | | | | |
| | | | ---> |~~~~~~~~ ========= ~~~~~~~~|
| | | | | | | |
|~~~~~~~~| | | | | | |
|________| |________| |________| |________|
Now obviously semiconductor band structure is not a bucket and water is not an electron gas but this illustrates the basic process. Let's try and stretch the metaphor a little... Before we connected the buckets they were both electrically neutral, this implies that by allowing the exchange of water we should expect an internal build-in electric field and associate potential.
But notice, that the "voltage drop" across the buckets is just the potential energy difference between the left and the right sides, which is zero because both waters levels have the same height.
So back to your question; we know the pn-junction has a built-in potential, so why can't we measure that? Well this is the potential required to lower the n-side band such that the Fermi levels of both sides can align. The internal potential is equal to the difference of Fermi-levels (water heights) before alignment.
Best Answer
Your scenario assumes that you are not able to inject/extract electrons into your semiconductor at wherever the contacts exist. In other words, you have infinite contact resistance, and in that case, yes, electrons and holes would build up on opposite sides. All voltage drop would occur at these charge buildup regions at the edges of the semiconductor, and the Fermi level is flat in between. It's the same as a metal floating in an electric field but not contacted; the charges move to cancel out the electric field on the inside.
In the opposite extreme, if the contacts are perfect, all the voltage drop will occur in the semiconductor. You'd have a linear sloped Fermi level, and bands parallel to that. There would be a drift, but not diffusion, current.
The stuff about photoconductivity above is extraneous.