In my experience that's not an easy question to answer definitively. You'll find often in dentistry that most questions are answered in multiple ways.
The answer below should not be used in any specific situation as clinical observation is required. It is merely an academic assessment of a general scenario rather than a case specific answer.
In this case the answer to your questions is: it depends. As you'll learn in school there are different zones in caries and what zone is left determines the prognosis. If all you leave are zones that are affected by the bacteria but not invaded then the prognosis is fairly good and most likely you will have no issues. If you leave a large portion of dentin that is well invaded then there is a chance that the caries will continue to progress.
Most likely, if you accidently left caries after doing a thorough exam of the preparation (both visual and tactile along the entire internal surface) and you followed your preparation procedures correctly (circumscribing the caries first at the DEJ before cleaning out) then you will most likely be fine as the body will seal off the remaining caries. Having said that it is a clinical judgment that cannot be answered in any way safely on a forum such as this.
The other issue is patient age and health. The tooth can only heal if there is adequate blood supply thorough the apical foramen of the tooth. Without proper blood supply there is no ability to fight the infection and the prognosis goes down.
Best solution, make sure ALL caries is removed, if you suspect there is anything remaining do not hesitate to ask a faculty. It would be much better for you to look bad in front of the patient than to risk the patient's health. If you're concerned about a pulp exposure then follow your judgment regarding indirect pulp cap vs direct pulp cap along with a good follow up procedure to check healing of the tooth.