Transferring out of Rank 1 PhD program to another PhD program I'm a first-year at a top-ranked institution in a PhD program that I have not had a formal background in. My PI is really great. The only real flaw I've seen so far is that his students take a while to graduate (most seem to have taken 6-6.5 years...). But I enjoy the research, even though I've just barely started. 

The problem is more with the department and classes. I'm truly uncertain if I will be able to pass (i.e. >= B) one of the required classes I'm in, and another class I'm taking I'm pretty much certain I will have to drop (before the deadline) because I just don't have the background necessary for it even though I was told I would. I've been studying for the upcoming exam for weeks, but I still feel very behind where I need to be. The fact that if I get below a B I have to wait a year to retake it is also off-putting. I don't think I could wait a year knowing my future hinges on one exam. 

I really want to do a PhD though, both for my personal and career-related goals. I love research and being involved in that community. I don't love this stressful environment where professors seem to have no issue kicking you out. 

If things don't go well, is it possible to leave this program to start anew at another program? I know this would burn all bridges here, but I'm just trying to brainstorm my options. I'm just not really sure what to do.

Of course, I will wait and see how I do on my upcoming exam, but I just frankly don't think it will go well. Does anyone have any advice? This all makes for a very stressful situation. I'll just keep studying for now.
Right around the first midterm of every course I feel like just throwing it all away (I have multiple degrees and working on another one right now). It's the same feeling I have right before I go out to a party that I want to go to but will have a lot of people.  I think it's just anxiety.  What's the worst case?  You have to take the course again?  You're concerned that you don't have enough background?  Think instead of all the cool stuff you still get to learn.  I had a CS professor who asked the class,  "who has heard of 3-SAT?"  No one raised their hand.  You could tell the excitement in her voice.  "I get to be the person who teaches you 3-SAT!"  Think of it that way.  Someday you will learn 3-SAT, and a million other great things.  Now go study!