I think one of the solutions that these countries can work is to promote high skill immigration to their countries. Something similar to what Australia and Canada are doing. Give the potential immigrants a chance to become full EU nationals in 4-5 years. I am pretty sure lot of skilled ppl from developing nations will be ready to move for that to these countries which offer a great quality of life. It might also help them overcome the problems of aging population in these countries as well. But the only caveat is that immigration process is tightly controlled to allow the most suitable applicants only.