Your Premise Can Not Work
Menial tasks like cooking, maintenance, anything unrelated to science
will be contracted.
How does that work exactly? Do you fly in a team of people to clean houses once a week? Does the laundry go out by train across the border and back again? Or do you have large numbers of second-class citizens (or people not even granted citizenship) living in your country?
Every time any locality has ever created a "noble" class (whether it's actual nobles or a collection of valued people at a large workplace), there is always a support team. A team that almost always vastly outnumbers the nobles.
Let's take the National Aeronautics and Space Administration (United States) as an example. Their complexes are huge and they often build nearby housing complexes for their workers. You can easily imagine a small country entirely populated by groups such as NASA where everything revolves around them.
Who Works for NASA?
NASA’s Headquarters is in Washington, D.C. The
agency has nine centers, the Jet Propulsion Laboratory and seven test
and research facilities located in several states around the country.
More than 17,000 people work for NASA. Many more people work with the
agency as government contractors. These people are hired by companies
that NASA pays to do work. The combined workforce represents a variety
of jobs. Astronauts may be the best-known NASA employees, but they
only represent a small number of the total workforce. Many NASA
workers are scientists and engineers. But people there hold many other
jobs, too, from secretaries to writers to lawyers to teachers.
Of the 17,211 people working for NASA in 2015 (page SD-6), 7788 (45%) are in a category called "Safety, Security, and Mission Services." Those are the folks not working for a particular department and are doing janitorial, security, landscape, tradework (like HVAC, plumbing, electrical), transportation, food service, and a whole variety of non-science jobs.
Within other categories like Science or Aeronautics, we see numbers of people, but you know a large portion of them are clerical, secretarial, or management, and not doing actual science.
Then there are the people who care for where the scientists are when they're not at work. Who builds and maintains the housing? What about grocery stores, restaurants, movie theaters, ice skating rinks? Do the scientists have families? Are all of their spouses scientists too? What about their children? Do they go to school? Who is teaching them...and providing support services for the teachers? Who takes care of the children if they're too young to be in school or outside of school hours, if both parents are working their science jobs? What about transportation around the country? School buses? Commuting to work? Moving around and between the huge job centers?
The outwardly valued people of NASA are scientists and astronauts. But they are a minority of the total workers. It takes a lot of people to form the village (to coin a phrase) that allows the science to happen.
What happens to all those people who are not scientists in your "scientist-only" world?
If your question is, can a county make its only export be the products of scientific research, the answer is sure. Under the right conditions. But your stated question is about making a country (not a town or or a company, but a full country) that where the only citizens are scientists and engineers and even their citizenship is conditional, based on their work output. Is that possible? No, it is not.