Yes. This is exactly what the golden visa scheme in Greece offers. If you invest €250,000 in real estate, a villa or apartment then you can apply for a permanent residence visa lasting five years and renewable if you retain the property investment. Note this rises to €500,000 for certain areas, including Athens, from mid 2023.