From a philosophical point of view, I think that the answer to your question depends upon the moral theory one adopts. If one is a Kantian, for example, then the morality of an action depends entirely upon one's intention and upon the action's conformity to the moral law. Given this Kantian framework, it would be possible for an action to the be moral even if there is no one 'on the receiving end', so to speak. Both utilitarians and virtue ethicists, on the other hand, would argue that the morality of an action is dependent upon how that action impacts on another person or persons. So, the notion that an action directed at a non-existent person could qualify as either moral or immoral would make no sense to a utilitarian or a virtue ethicist. Even under the Kantian framework, although an act could theoretically be moral even if directed at a non-existent person, this would be a trivial and empty sense of morality. As William James points out, morality really only begins to make sense as soon as there is more than one person in the universe because a meaningful notion of morality must be relational.
From a philosophical point of view, I think that the answer to your question depends upon the moral theory one adopts. If one is a Kantian, for example, then the morality of an action depends entirely upon one's intention and upon the action's conformity to the moral law. Given this Kantian framework, it would be possible for an action to the be moral even if there is no one 'on the receiving end', so to speak. Both utilitarians and virtue ethicists, on the other hand, would argue that the morality of an action is dependent upon how that action impacts on another person or persons. So, the notion that an action directed at a non-existent person could qualify as either moral or immoral would make no sense to a utilitarian or a virtue ethicist. Even under the Kantian framework, although an act could theoretically be moral even if directed at a non-existent person, this would be a trivial and empty sense of morality. As William James points out, morality really only begins to make sense as soon as there is more than one person in the universe because a meaningful notion of morality must be relational.
I think there is more to this question. You're assumption is that the only people involved in this choice or action is (based on the example) yourself and the unborn child. In reality, there are loved ones, friends, lovers, that will all avoid the suffering from this person (assuming your example is of a genetic disease).
Take the example of someone who will pass a dominant mutation to their offspring (Huntingtons Disease). One could argue, as you have, that the decision to spare him/her that fate is either moral or not; however, you must also take into account the grandparents who will be spared the knowledge that they may, potentially, outlive their grandchild; the mother, being spared the knowledge that she could live to see her child's death; the potential child's children, who will also be spared the potential disease.
In this, one could argue that the decision proved moral to those who 1)already exist and 2) would be emotionally bonded to the child. Additionally, one could argue about the morality of discontinuing the source of a deleterious mutation for humanity as a whole (debatable).
Obviously, a complex question. Very interesting, though.
Getting away from which formal philosophical frameworks, I would argue that YES, actions taken in consideration of non-existent persons can be moral or immoral. For example, it is unlikely that anyone alive today will exist 150 years in the future. However, I think that most people would consider that there is a moral imperative to consider whether our actions today could result in catastrophic consequences in the future. If we discovered that an asteroid would collide with the earth in 150 years wiping out all humanity, would we ignore it because none of the people who will be affected currently exist? I think part of the difficulty in answering this question is related to our view that all non-existent people are the same, perhaps we need to consider different categories of non-existent people, for example, hypothetical people, potential people, future people.
The above answers are basically correct. The answer depends on how you define (understand) morality. My (simplistic?) understanding reduces moral (ethical) behaviour to (1) good intention (benevolence) and (2) the respect for essential needs and dignity of others. If you behave in such way, then I consider your behaviour ethical, even if the effects of your behaviour are not optimal. Maybe your offspring would consider (their) lives worth living, but you cannot know this. Hence, if you behave in the way that *you* consider the best for others (regardless whether they currently exist or not), than I consider your behaviour ethical. However, this is a tricky issue, because it could lead to a destructive behaviour. For example, those who consider life bad (a suffering) could start killing others to deliver them from suffering. But I do not know *any* ethical theory that is "impeccable" in this sense and completely "safe".
Reading this as a clinical psychologist, I'd focus on another aspect of the question---not whether the non-existent person exists in the past of future, but in which "reality." Lorna Smith Benjamin, in her book Interpersonal Diagnosis and Treatment of Personality Disorders (Guilford, 2nd ed. 1996)---which uses the Structural Analysis of Social Behavior (SASB) as a model--coins the phrase "Klute Syndrome" to discuss a specific case of how the person's fantasies are crucial to therapeutic success. I quote her footnote on this, as she discusses the character in the movie Klute.: "One of the many themes in the movie is that the murderer was earlier encouraged by a call girl to act out his sexual fantasies, with the observation 'As long as it is only fantasy, it is okay.' As the movie unfolds, it becomes clear that his behavior follows the fantasy. For many years I have carefully tracked the hypothesis that the SASB codes of especially rigid interpersonal patterns that do not change even after a long trial of psychotherapy are the same as the SASB codes of the favorite sexual fantasies. Much of the time the hypothesis is confirmed, and I call this parallel between SASB codes of the chielf complaint and those of the favorite sexual fantasies the 'Klute Syndrome'." (p, 154, note 1). One would then argue that immoral behavior in fantasy, with a fantasy other---or immoral behavior in "transitional" or "illusory" space is still immoral behavior. This is of course consistent with the moral admonition in Matthew 5:28: "But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart."
To some extent a non-existent person or a potential future person is not much different than an anonymous person. For example, if we poisoned medicine intended for newborn babies without knowing which babies would consume the medicine, most people would feel that was immoral, just as if we poisoned a known baby. If we only poisoned medicine that would be consumed by newborns several months from now, those babies would be nonexistant at the time of our actions, but I don't think it would be less morally problematic.
Agreeing with most of the answers given here, i would raise Marina´s despite the contradiction "Even under the Kantian framework, although an act could theoretically be moral even if directed at a non-existent person, this would be a trivial and empty sense of morality", The axiom is a value regardless of it´s utility or evidence of utility, and the mistake of the "non-existent person". The future is, in essence, non existent person. The question i would place here, similarly to Kevin´s: Can we have a moral judgement on actions that, causal and mechanically, devalue, disregard non existent person!? It is evident that we do. The Courts of law make such judgements everyday. The Legislative branches increase the Penal protection of environment, having such dilemmas in mind. Abortion is only legal in some circumstances, in most of the developed world. Eugenics and genetical manipulation are not conventional medicine!! And so on and so on...
The example mentioned in this question is a very peculiar one indeed! Why should one go for not having a child so as to save the child, who does not exist, from the problems of life! If everyone starts thinking like this, then the world will soon be devoid of human beings! This is a wrong kind of philosophy. However, as this kind of a decision does not really affect anyone because that someone does not exist, it is not unethical!
Actions against the apparition and development of a child in order to save it of a future death (but also of a future life) are unethical. First: Nature is asking for its normal course (as to say, for its rights) and you are impeding them. The actions are against yourself, against your partner and against nature. Maybe also against society, as someone observed. Also, some relatives and friends, as your parents, might be dissapointed. And all those entities are existing. Second: all your sperm cells and all ovules of women you had contact with, are genetically existing human half-beings (see the notion of haploid cells). Most of them get lost during our life. But to hinder in an active way their fulfilment also cannot be an ethical action.
Note: I don't speak from some religious point of view and I am a person sad not to have had own children. However, if we accept that we are also living animal individuals, I think that it becomes clear that anticonceptional measure to prevent any kind of offspring are unethical. Once you have a child or two, the situation becomes more complicated. One can avoid further children in order to protect the existing children from a material point of view. It is not this aspect I called unethical.