We investigate the existence of a drag-minimizing shape for two classes of optimal-design problem of fluid mechanics, namely the vector Burgers equations and the Navier-Stokes equations. It is known that the two-dimensional Navier-Stokes problem of shape optimization has a solution in any class of domains with at most l holes. We show, for the Burgers equation in three dimensions, that the existence of a minimizer still holds in the classes Ocr and W introduced by Bucur and Zolesio. These classes are defined by means of capacitary constraints at the boundary. For the 3D Navier-Stokes equations we prove some results of existence of drag-minimizing shape, under additional assumptions on the class of domains to be considered. We also discuss how these assumptions critically depend on the definition of weak solutions for Navier-Stokes equations and, more specifically, on the characterization of the spaces in which it is possible to prove the uniqueness for the linear Stokes problem.