This question depends on how you believe children learn to behave. If children are exposed to chemicals such as drugs before they are born, then they are likely to have problems in school and beyond. Children who spend time in unstable homes are likely to have problems as well. The longer a child stays in these situations, the more likely the child is to struggle later in academic and social settings. Young children can experience post-traumatic stress disorder from an unstable home, and this can affect brain development later. Foster homes are not always perfect—children who feel inferior in foster homes may resent the foster parents and the system that placed them in this situation.
Of course, a child can embrace a positive relationship with foster parents and adopt a better life as well as a new family. Many children go to loving foster homes where their basic material and emotional needs are met, and they go on to be productive adults. A bad childhood does not entirely predetermine a bad adulthood. A child taken from a bad situation at a young enough age may not even remember the birth parents. This question has many variables, and it all depends on the age at which the child entered foster care, the nature of the foster family, the child's mental makeup due to brain chemistry, and your own personal beliefs about how children develop their personalities.