No, Caroline was not pregnant in real life during season 7 of The Vampire Diaries. Candice King, the actress who played Caroline, was not pregnant at the time.
While Caroline's pregnancy storyline in the show was a major plot point, it was entirely fictional. The writers created the storyline to explore Caroline's character development and her relationship with Alaric Saltzman.
Candice King later became pregnant in real life in 2017 and gave birth to a daughter. However, this was after the show's finale.