As many people have pointed out, you are more than capable of studying the course material, if it is in any way related to your area of expertise, and learning enough about it to teach undergraduates. (Undergraduates with poor instructors teach each other the course material all the time, for example.)
One thing that will help you is to stick fairly closely to the official textbook for the course, perhaps also studying a few other standard textbooks for perspective, so that the students have the ability to make up for any areas you are weaker in. And if students ask background questions you can't answer, it's OK to say "this is my first time teaching this class and I don't have all the answers, but I will look into that and let you know at the next class."
Nobody else seems to have pointed out what seems to be an important factor: Returning from a two-year leave of absence, you are presumably at the bottom of the pecking order when making class assignments; professors also presumably have dibs on teaching the course they taught last semester if they enjoyed it and got good student evaluations. Other class assignments were probably also made, officially or unofficially, while you were away from the university. You are simply the last available resource to fill out the course schedule before the university has to resort to hiring temps, who may be even less effective instructors than you.
However, whatever the outcome, do NOT take it out on the students. I once took a junior-level CS class taught by a research professor with more tenure than the Dean. He made it very clear in a thousand ways that he considered our class and its material beneath him.
-o- At that time students very carefully managed their schedules to only take one programming class per semester. He decided our class would be more interesting with programming hardware simulations. In a language he had written himself, for which there were no outside resources.
-o- In spite of clear University guidelines specifying otherwise, he refused to tell the class how much various assignments were worth, saying we wouldn't work hard enough on things that were weighted lower.
-o- Rather than publish the date of the midterm in advance, again as clearly required by University regulations, he announced at the lightly-attended class the Wednesday afternoon before Thanksgiving, hours after the dorms had already been locked up for the break, that the midterm would be given the Monday after Thanksgiving. 25% of the material on the midterm was based on new material, not in the class syllabus, introduced at that single class.
Again, this was a research professor who brought millions of dollars a year to the University. Students who complained were told that nothing could be done.