"The object always remains in the same position."
+ "(people have never reached it in) hundreds of years"
Assuming the object is placed within the atmosphere, these two constraints sort of make the height irrelevant. Any technology that can manufacture an object capable of staying afloat, undamaged, without moving relative to the earth (ie unaffected by wind currents, storms, potentially even more extreme events like volcanic eruptions etc) for hundreds of years can probably make the same object completely untouchable by any means a medieval-level civilization could possess or develop.
Assuming the object can be in space, the cheap answer is to put it in geostationary orbit. It would have to be pretty damn big to remain "clearly visible from the ground", but if you accept that it can only be visible, say, during the nighttime, it is feasible to keep such an object there for many hundreds of years, and a medieval-level civilization would have no way to reach it.
Another cheap answer is holographic projection. Bury a projection method in a nearby mountain and just have it project an image. That way you can ensure that no matter what, it cannot be reached. Bonus points if you program the projector to always shift the image slightly upwards when it detects some mass closing in.
But if you don't like any of the above: a medieval civilization can make a hot air balloon. The highest a hot air balloon has reached is about 21 km, comfortably over twice as high as Mount Everest. If you were to get creative and mount a ballista (should be better than a trebuchet if you want height, when pointed straight up) on some kind of hot-air-balloon-grid (hey, you said reaching the damn thing is a priority, right?), you might edge in another half kilometer or so. To make it safe I'd say that somewhere in the area of 25 km would make it pretty safe from the hands of your medieval civ.