Here's another way of getting to the same answer as Peter's. A functor $F\colon A\to B$ preserves pullbacks if and only if the induced functor $F/1 \colon A \to B/F1$ preserves all finite limits, where 1 is the terminal object of A. When F is left Kan extension $L\colon Psh(C) \to Psh(D)$ along a functor $f\colon C\to D$, it's not hard to check that Psh(D)/L1 is equivalent to presheaves on the opposite of the category el(L1) of elements of L1 (this is true with any presheaf replacing L1), and that L/1 is left Kan extension along the induced functor $f'\colon C\to el(L1)$el(L1)^{op}$. Thus, we need to know when that functor is flat.
Now an object of el(L1) $el(L1)^{op}$ is an object $d\in D$ together with a connected component, call it X, of the comma category $(f\downarrow d)$, and (d\downarrow f)$. And a morphism in el(L1) $el(L1)^{op}$ is a morphism $d_1\to d_2$ such that the induced functor $(f\downarrow d_1(d_2\downarrow f) \to (f\downarrow d_2)$ d_1\downarrow f)$ maps $X_1$ X_2$ to $X_2$. X_1$. You can then check that the comma category $(f'\downarrow (d,X))$ ((d,X)\downarrow f')$ is precisely the connected component X of the comma category $(f\downarrow d)$(d\downarrow f)$. Therefore, since $f'$ is flat just when all categories $(f'\downarrow (d,X))$ ((d,X)\downarrow f')$ are cofiltered, we conclude that left Kan extension along f preserves pullbacks iff all connected components of all comma categories $(f\downarrow d)$ (d\downarrow f)$ are cofiltered, i.e. if all $(f\downarrow d)$ (d\downarrow f)$ are "semi-filtered" in Peter's terminology.
Edit: you also asked for a specific counterexample when $f\colon C\to D$ is the inclusion of a lluf subcategory. Let D be the walking commutative square generated by arrows $a\to b$, $a\to c$, $b\to d$, and $c\to d$, and let C be its lluf subcategory containing the identities and the arrows $b\to d$ and $c\to d$. Then the comma category $(a\downarrow f)$ has two connected components, one of which is not semi-cofiltered.

