Reaction of acyl chlorides with diazomethane and silver(I) oxide
Your first reaction is correct. You do get an acid chloride. The reaction would proceed with the first step being what you have proposed:
$$\ce{R-COOH -&gt;[SOCl2] R-COCl}$$
Now, the next step is a reaction known as Arndt-Eistert Reaction:
$$\ce{R-COCl -&gt;[CH2N2][Ag2O/CH3OH] R-CH2-COOCH3}$$
The mechanism for this reaction is as follows:


Note: Mechanism is from Organic-Chemistry.org