Congratulations on your purchase! Do you have any photos yet?
The generic advice you'll likely hear will be to bleed the injector and fuel lines from the tank to the injectors. Hoye has a good description here:
Yanmar Tractor Fuel Filter Change
and continuing here:
Yanmar Tractor Fuel Bleeding Procedure
Since you describe it as being in good condition and with low hours, it's likely a fuel problem. Make sure to look at the lines and connections to and from the fuel filter, as well as the sediment bowl itself and gasket. There have been people report that air has gained access to the system there. Hoye's directions don't specifically mention it, but it's a lot easier to crank the engine by using the decompression lever, and is easier on the starter.
There's some chance that there is low compression, but it's a little bit more involved to test (and fix). I had missing parts on my YM240 that allowed a rocker arm to slide out of place and gave mine a miss, but that's not what you're experiencing, since you say it goes away above idle.
How old is the fuel? Many here have good results using Power Service brand additive. Try fresh fuel with the appropriate amount of additive, bleed the fuel lines, and hopefully that will do the trick.
You should maybe check/replace the fuel and air filters while you're doing this. You'll be dirty anyway, so change the oil and filter. It won't correct the miss but will provide peace of mind. With the hood open and maintenance ongoing, check the coolant and inspect the radiator. Gently wash out the radiator; frequently when mowing, especially, the screen or core of the radiator can get clogged and lead to overheating. You may as well get everything covered. Your tractor will be prepped and ready to go, freshly serviced.
Good luck. Let us know how it turns out.