If eyeglasses did not exist in ancient history, how did people with poor vision see at all?

Poorly. The first evidence that humans tried to imprve vision was the discovery of magnifying 'pebbles' about 1500 years ago. In ancient times, those with poor vision were untreated. Unfortunately this remains a significant problem in poorer nations where people cannot get or afford glasses.
Squinting. They probably squinted a lot or used some variant of pinhole glasses to improve sight. Many were likely selected out by their inability to function as well as others in society.