Is there such a thing as "cartesian closure" in category theory? Take a finite collection of sets $E_1, \ldots, E_n$.  Form a category $\mathcal{E}$ whose objects consist of $E_1, \ldots, E_n$ and whose morphisms are just functions between sets.
Intuitively, it feels like there should be a category $\mathcal{C}$ which deserves to be called the "cartesian closure" of $\mathcal{E}$.  Roughly, we should adjoin all finite products of objects in $\mathcal{C}$, then all sets of functions between objects, then all finite products again, and so on.
Without having worked out the details, I would guess that $\mathcal{C}$ can be characterized up to equivalence by the property that any functor $\mathcal{E} \to \mathcal{C}'$ where $\mathcal{C}'$ is cartesian closed factors uniquely through $\mathcal{C}$.
So my question is: does the cartesian closure exist, and does it have the universal property that I describe?  Moreover, does every category have a cartesian closure in this sense?  Or at least every category which embeds faithfully into some cartesian closed category (note that $\mathcal{E}$ is a subcategory of the cartesian closed category Set)?
 A: Yes, there is. The theory of freely adjoining to a category structure involving functors of different variances is tricky; it's simpler to understand the case of just adjoining finite products. The free category with finite products $C_p$ on some $C$ has as objects strings of objects of $C$, and morphisms $C_p(a_i,b_j)=\coprod_i\prod j C(a_i,b_j)$. Then the product is just given by concatenation. Notice that every morphism out of a product in $C_p$ factors through a projection. So the free completion under products of some category of sets is not going to be anything like a category of sets! In fact, the free completion of a point under finite products is the opposite of the category of finite sets, since the category of finite sets is the free completion of a point under finite coproducts.
The situation for freely adjoining finite limits and internal homs is analogous, but of course much more complicated. An object of the Cartesian closure $C_c$ is, in essence, any formal expression built from $C$ in terms of the operations of a Cartesian closed category. Again if $C$ is a category of sets, the free Cartesian closure will not be, for similar reasons to the above: the only morphisms out of $a^b$, for instance, are those that formally have to be there, which I think amount to those factoring through evaluation at a point of $b$. Such things are studied properly via 2-monad theory, or its special case, Kelly's theory of clubs.
As to the universal property, it's what one should expect: a structure-preserving (i.e. preserving finite products, or all finite limits and homs) map out of any free completion into a category with the appropriate structure is equivalent to a map from $C$. 
EDIT: Based on comments on the OP, it seems I misunderstood what you were looking for. If $C\subset \hat C$ is a full subcategory of a Cartesian closed category, then certainly it has a Cartesian closure given by the intersection of all full Cartesian closed subcategories of $\hat C$ containing $C$. This exists by the same arguments that give all kinds of closures in more classical algebra and topology, except for one wrinkle. If you define a Cartesian closed category as one in which objects satisfying the universal properties of limits and homs merely exist, then the intersection of Cartesian closed subcategories $C_1,C_2$ of $\hat C$ need not be Cartesian closed: $C_1$ and $C_2$ might contain objects $c,d$, and two different products $(c\times d)_1,(c\times d)_2$, so that $C_1\cap C_2$ contains no product of $c$ and $d$. There are two ways around this issue: either insist on replete (i.e. closed under isomorphism) subcategories, in which case the property of Cartesian closedness as normally defined does pass to intersections, or assume $\hat C$ comes equipped with choices of limit and internal hom functors, that is, specific choices of limits and hom-objects. Then take the intersection of subcategories containing $C$ and closed under the chosen Cartesian closedness data. Either option works great. The first is more characteristically category theoretic, while the second has a more classical feel.
However, it is important to note that, as follows from the original answer above, the Cartesian closure in this sense does not have the universal property you wanted. That is, this is generally nowhere close to the free Cartesian closed category on $C$. Again, this is perfectly familiar from classical algebra and topology: for instance, the closure of a subspace $S$ of a compact Hausdorff space $T$ has no universal property among compact Hausdorff spaces containing $S$, unless we luckily choose $T$ such that $\bar S=\beta S$ is the Stone-Cech compactification.
