Ok, I've had a quick look with these minimal examples.
Q:[discrete,0,0],[0,2/5],[3,2/5],[5,-(8/5)];
M:if x < 3 then (2*x)/5 else (8*(5-x))/5-(5-x)^2/2;
and castext
{@plot( [Q, M], [x,0,5], [xlabel,"x/a"], grid2d,[legend, "F_Q/(q_0 a)", "M/(q_0 a^2)"],[y,-2.1,1.78],[box,false],[axes,solid])@}
{@plot(x^2,[x,-3,3],[y,-3,10],[xlabel,"This is x squared"])@}
The second plot does have the x-label plot in STACK, but your plot does not produce the x-label in desktop Maxima! So, I think this is a "Maxima thing" rather than a "STACK thing" (!). Sorry not to be more helpful, but could have a look at this issue using desktop Maxima? If you need a bug fix, let me know and I'll help.