This paper deals with backstepping design for boundary PDE control/observer as a convex optimization problem. Both Volterra and Fredholm operators are analysed for a class of parabolic and hyperbolic PDEs. The resulting Kernel-PDEs are formulated in terms of polynomial functions, the parameters of which are optimized using Sum-of-Squares (SOS) techniques and solved via semidefinite programming. Uniqueness and invertibility of the Fredholm-type transformation are proven for polynomial Kernels in the space of real-analytic functions. The inverse kernels are approximated as the optimal solution of a SOS and moment problem. The effectiveness of this approach is illustrated by numerical simulations.