This paper is concerned with the Cauchy-Dirichlet problem for a doubly nonlinear parabolic equation involving variable exponents and provides some theorems on existence and regularity of strong solutions. In the proof of these results, we also analyze the relations occurring between Lebesgue spaces of space-time variables and Lebesgue-Bochner spaces of vector-valued functions, with a special emphasis on measurability issues and particularly referring to the case of space-dependent variable exponents. Moreover, we establish a chain rule for (possibly nonsmooth) convex functionals defined on variable exponent spaces. Actually, in such a peculiar functional setting the proof of this integration formula is nontrivial and requires a proper reformulation of some basic concepts of convex analysis, like those of resolvent, of Yosida approximation, and of Moreau-Yosida regularization.