It all depends on whether you treat the budget constraint as an equality or inequality constraint. These are two different problems, with two different solutions in this case.
One version of the problem (rewriting the objective in the form suggested by denesp, and dropping the constant, for clarity) is
\begin{align}
\max~&-4(x-4.5)^2 -2(y-1.5)^2\\\text{s.t. }&5x+7y=40
\end{align}
With this equality constraint, the optimum is $(x,y)=(4.78,2.29)$ as you found using the method of Lagrange multipliers and Wolfram alpha. It's true that you would prefer consuming less and staying at the bliss point, but if we assume that the budget constraint is an equality then you aren't allowed to consume less.
Another version of the problem is
\begin{align}
\max~&-4(x-4.5)^2 -2(y-1.5)^2\\\text{s.t. }&5x+7y\leq40
\end{align}
with an inequality in the budget constraint. Here, as you point out, it's clear that the optimum is $(x,y)=(4.5,1.5)$, because that's the consumption profile that globally maximizes the utility function (and it obeys the budget inequality).
Assuming that the budget constraint is an inequality is usually more appropriate (presuming that you can always "throw away" extra wealth).
When solving constrained optimization problems where some of the constraints are inequalities, we need a generalization of the basic method of Lagrange multipliers called the Karesh-Kuhn-Tucker (KKT) conditions, which has probably not been covered in your course. You can read about this in more detail in the linked wikipedia article, but the basic idea is simple: we can still set up the Lagrangian, where we write the constraint as $g(x,y)=5x+7x-40\leq 0$ and then subtract $\lambda g(x,y)$ from the objective:
$$\mathcal{L} = -4(x-4.5)^2 -2(y-1.5)^2 - \lambda(5x+7y-40)$$
We can then equate the partial derivatives to 0 ($\partial\mathcal{L}/\partial x = 0$ and $\partial\mathcal{L}/\partial y=0$) to get two conditions
\begin{align}
\frac{\partial\mathcal{L}}{\partial x}&=0 \Longleftrightarrow 8(x-4.5)=-5\lambda\tag{1}\\
\frac{\partial\mathcal{L}}{\partial y}&=0 \Longleftrightarrow 4(y-1.5)=-7\lambda\tag{2}
\end{align}
The question, then, is how to pin down $\lambda$. You're probably used to finding $\lambda$ by seeing which value causes the budget constraint to hold with equality. In this case, however, that implies $\lambda<0$. This is not allowed for an inequality constraint under the KKT conditions, which require $\lambda\geq 0$.** Since $\lambda$ turns out to be the marginal utility of wealth, this constraint is tantamount to saying that more wealth (which relaxes the inequality) shouldn't hurt us.
The KKT conditions also have a requirement called complementary slackness, which states that either the inequality must bind (holding with equality) at the optimum, or else $\lambda$ must be 0. (Since $\lambda$ measures the "cost" of the constraint, this is logical: if the constraint isn't binding, then the cost must be 0, and it shouldn't be affecting your local optimization problem.) We already saw that if the budget constraint holds with equality, we get $\lambda<0$, which isn't allowed, so complementary slackness implies our only remaining option is $\lambda=0$. Plugging this into (1) and (2) above, we get $(x,y) = (4.5,1.5)$, which is the solution you already found intuitively.
Usually, there is no need in introductory micro to use the full KKT conditions, because we work with utility functions that are monotonic, where you'll always want to exhaust your budget constraint. Simple concave quadratic utility with an interior bliss point, like in this case, is an exception where we need a very simple case of the KKT conditions to do the optimization properly.
**Note: of course, if we add $\lambda g(x)$ rather than subtract it to the Lagrangian, the signs reverse. I've seen many different conventions, and I'm going with the one that makes $\lambda$ nonnegative. The Wikipedia article uses the opposite convention.