You might be right. I noticed this also when I was looking at Kubota M series machines. I actually made up a spreadsheet and charted the M series lineup in terms of tractor price/PTO HP. The price/PTO HP started at $574 for the M5040HD and decreased to a minimum of $416 for the M9540HD and then went up slightly with the M96S and M108S models. The M9540 was the best bang for the buck in both 2wd and 4wd models.
The M6040 and M7040 share the same engine, and the M8540 and M9540 share the same engine. Don't forget to consider other differences between the models besides engine HP. For example the 7040 includes a limited slip front differential and bigger wheels/tires.
As for myself, I bought the 8540 and it does all I need it to do. Like you I would be interested to know exactly what Kubota changed to get a few more HP in the 9540, but I doubt I would make any changes. If I needed more power I would probably trade up.
I want Kubota to offer a tractor I call the M9540V. This tractor would be a M9540 but it would have a computer system that would control certain parameters (fuel system, turbo, timing, valves, etc) to adjust the power over some range (perhaps 60 to 95 HP) as required/desired and it would improve economy and reduce emissions. It would also simplify tractor buying because it would reduce the number of models in the tractor lineup, which could perhaps lead to reduced costs. For example, the M5040/6040/7040 models could be replaced with the M7040V. The M8540/9540 models could be replaced with the M9540V. The M96S/108S could be replaced with the M108V...... What do you think?