Same chassis and same engine. What makes up the 7hp or so difference? Bigger injectors? Different injector pump? All same and just some adjustments on injector pump?
According to these two pages the M6040 is normally aspirated and the M7040 is turbocharged. Scroll to the bottom of the page to see the engine details in a table for each page.
Check out the Kubota M6040 Tractor Price, Specs, Features like engine, horsepower, power take-off, mileage, transmission system, hydraulic performance.
Kubota M7040 Tractor Price in the USA, Technical Specifications, Key Features such as engine, transmission, hydraulics, Tire, fuel, front loader, and images