The practical consequence is that there is no x in the second argument until after it is evaluated. And this happens (as it happens) after the macro-style substitution of 10 for x in that second argument. To force the expression in the second argument to be x^2/2, simply use Evaluate.
In[299]:= With[{x = 10}, Evaluate@a]
Out[299]= 50
This next shows a bit more detail about the evaluation sequence for the example.
Hello, I think these suggestions are not what I really need; I need a way to evaluate the integration result for a concrete value of x, but without permanently changing the formula for the integration result by substituting this x value. It seems that the following construct does what I need, but I have a feeling that it is not elegant; I presume there must be a more adequate (more efficient?) way: