to obtain a dynamic model of a DC motor you should get the parameters of the electrical circuit and mechanical part of the motor. The necessary parameters are:
Note that transfer function or dynamic characteristics of a dc motor are different with its static characteristics (i.e. Torque vs Speed). There are many methods you can find the dynamic characteristics of a dc motor. For example, in order to find dynamic characteristics of a dc motor in term of transfer function or electrical equivalent circuit, you must run the dc motor in a specific work point and make a small disturbance to motor state(from mechanical or electrical input) and save output trend. After model identification process, you can find dynamic model of dc motor. Note that this model may be different in the various work points.