There is a x540 for sale locally. 2009, 54" deck, 450 hours in great condition. Asking $5k but I suspect $4 to $4.5 would take it. Sounds like a good deal.
Sounds like you may have either a warped deck or bent spindle or spindle mount.Also ,I had a motorcycle doing the surging until warm problem...turned out to be the intake manifold wasnt sealing good until warmed up.RTV silicone around connection solved it.Being a X540 owner there a couple of things I would recommend to you. It smokes when you let it sit overnight and start it. Nothing I know of you can do about it. The engine just smokes on startup. Next, rough surge running. Until the engine warms up the blasted thing is going to surge up and down. I have changed fuel filters and cleaned /adjusted the carb to no avail. It is just going to surge up and down. I also recommend you go cut some bremuda grass with it. Mine gives a terrible and uneven cut even with deck leveling and new blades. I am thinking of trading my X540 for a brick then throwing the brick in the river so I can say I actually lost something.