Minimizing a functional with a free boundary condition
Note that we can write $J$ as
$$J(y) = \int_0^1 \left(2 y(x)y'(x) + y'(x)^2\right) \ dx \, + \, y(0)^2$$
Setting aside the constant $y(0)^2 = 1$ for now, we have $J$ as the integral of a function $F(y,y',x)$ where $F(y,y',x) = 2yy' + y'^2$.
You can now deploy your box of tricks on $F$ to find $y$. That is, the Euler-Lagrange equation:
$$0 = \frac{d \ }{dx} \frac{\partial F}{\partial y'} - \frac{\partial F}{\partial y} = \ ... $$
Your approach is correct, but it could be expressed more precisely. The first step is to replace the free boundary problem by a more familiar variational problem: find $$ M(c) = \inf\left\{\int_0^1 (y'(x))^2\,dx : y(0)=1, \ y(1)=c \right\}\tag{1} $$ Having found $M(c)$, you can minimize $c^2+M(c)$ over all $c\in\mathbb{R}$ and thus obtain the minimum of functional $J$.
The Euler-Lagrange equation for $(1)$ is $y''=0$, which leads to the minimizer $y(x) = 1+(c-1)x$ and subsequently $M(c) = (c-1)^2$.
Then $c^2+M(c) = c^2+(c-1)^2 $ is minimized at $ c= 1/2$, which delivers $\min J = 1/2$, attained by $y(x) = 1-x/2$.
Hints:
If one varies infinitesimally the functional $$J[y]~:=~y(1)^2 + \int_0^1\! dx~ y^{\prime}(x)^2\tag{1}$$ without discarding boundary contributions, one finds $$ \delta J[y]~=~ 2 y(1)~\delta y(1) + 2\int_0^1\! dx~ y^{\prime}(x) ~\delta y^{\prime}(x)$$ $$~\stackrel{\text{int. by parts}}{=}~ 2\left[ y(1) + y^{\prime}(1)\right] \delta y(1) -2 y^{\prime}(0)~\underbrace{\delta y(0)}_{=0} - 2\int_0^1\! dx~ y^{\prime\prime}(x) ~\delta y(x).\tag{2}$$
Besides the given boundary condition $y(0)=1$, one concludes from formula (2) that a stationary configuration must obey $$ y(1) + y^{\prime}(1)~=~0\quad\text{and} \quad\forall x\in [0,1]:y^{\prime\prime}(x)~=~0.\tag{3}$$