Regularity properties for Monge transport density and for solutions of some shape optimization problem