For the $-\Delta$ operator is positive definite if the Dirichlet boundary is non-empty, here your problem is actually to find $\lambda >0$ such that: $ -X'' = \lambda X.\tag{1} $ General solution to (1) is $ X = A\cos(\sqrt{\lambda}x)+ B\sin(\sqrt{\lambda}x), $ and $ X' = -A\sqrt{\lambda}\sin(\sqrt{\lambda}x)+ B\sqrt{\lambda}\cos(\sqrt{\lambda}x). $ The boundary condition $ X'(0)=0\implies B = 0, $ and $ X(L) = a\implies A\cos(\sqrt{\lambda}L) = a\implies A = \frac{a}{\cos(\sqrt{\lambda}L)}.\tag{2} $ Therefore the solution is: $ X_{\lambda}(x) = \frac{a\cos(\sqrt{\lambda}x)}{\cos(\sqrt{\lambda}L)}. $ Given the denominator is non-zero.
Thanks to the remark of Michael Seifert. This problem with a non-homogeneous boundary condition is like a Helmholtz equation, in order it has a unique solution $\lambda$ CANNOT be an eigenvalue of the eigenvalue problem below: i.e., for $j=1,2,3,\dots$ $ \lambda \neq \frac{(2j - 1)^2 \pi^2}{4 L^2} $ in order that (1) has a unique solution with boundary value $ X'(0) = 0, \quad X(L)=a. $
Notice that for Dirichlet eigenvalue problem on an interval, you could only have complete squares $k^2$ (un-normalized) as $\lambda$. The wikipedia pages mellow posted has normalized eigenfunctions for mixed Neumann-Dirichlet boundary value problems as: $ X_j(x) = \sqrt{\frac{2}{L}} \cos\left(\frac{(2j - 1) \pi x}{2 L}\right), $ with eigenvalue $ \lambda_j = \frac{(2j - 1)^2 \pi^2}{4 L^2}. $ This is because the wikipedia page uses homogeneous boundary condtions on both Neumann and Dirichlet boundaries: $ X'(0) = 0\quad \text{and}\quad X(L) = 0. $ Notice the second Dirichlet boundary condition will change (2) to $ A\cos(\sqrt{\lambda}L) = 0\implies \sqrt{\lambda}L = \frac{(2j-1)\pi}{2}. $ That's why wikipedia's page has that solution.