This is the quintessential "it depends". If the motorcycle was lightly used over a number of years and properly maintained and winterized, itshouldn't be a problem. If it was used quite a bit at first and then stuck in the back of a shed for the rest of that time without being properly moth balled, it could be quite the project.
Growing up my neighbor had a UJM garage queen. It got a thorough maintenance every spring and full winterization in the fall. The guy was kind of a Goldilocks rider, though, and only ventured out on it when conditions were just right. He probably rode it just enough to burn off the fuel that had the stabilizer in it from the previous fall and maybe a second tank of gas each summer before winterizing it again. I wouldn't have too many qualms about buying that bike.
On the other hand I've known people to buy just about anything with a motor and then stuff it in a shed or leave it in the bushes as soon as new wears off or the need that caused them to purchase whatever gets satisfied. After a few years they realize it's taking up space and is a fungible asset. Then they sell it as "barely used". Those types of cars, trucks, tractors, lawn mowers, boat motors and motorcycles are likely to turn into projects.