Yeah there's a way to tell. Call Kubota directly (customer service number)-everything is serialized, and they should have the original engine serial number on file. I do know all the tractors come from the factory with a white sticker on them that has the tractor model, serial, and then the engine serial number, on that sticker. Kubota records this. Another avenue, if a dealer replaced the engine within the last 4 years, there will be record of it. Kubota has a system of a "replacement engine request" that MUST be filled out in it's entirety before an engine is shipped to a dealer. That form asks for the installed engine's serial number, the machine's serial number, and a bunch of other stuff, and a bunch more stuff if it's over 25hp, including documentation of the failed engine's destruction. Even if a dealer didn't do it, you can give the customer service guys/gals your current engine serial number, and they can kinda tell you where it came from, who ordered it, why, etc.
The days of just blindly ordering a diesel engine are over. Everything's documented now and has been for a few years now-- thanks to the good old US EPA.