Are there any optimization problems in P whose decision version is hard?
No. The optimization problem is "How big is the biggest&nbsp;$X$?" and the decision problem is "Is there an&nbsp;$X$ that is bigger than&nbsp;$y$?" Solving the decision problem simply involves comparing $y$ with the size of the biggest&nbsp;$X$.  You can certainly compare two numbers in polynomial time so, if you can solve the optimization problem (compute the size of the biggest&nbsp;$X$) in polynomial time, you can solve the decision problem.