I live in this area. Your selected route is not one that I would pick. Let's take a look at the geography of the area you're planning on riding.
San Rafael is near the coast, with little mountains to the west and smaller mountains to the east. Once you get over them as you head east, you then have to cross a big big flat area, the Central Valley, to get to the foothills of the Sierra. The Central Valley is hot, flat, windy and dull. The average high in July is 35 degrees C and it can get a lot hotter. It's not a fun place to ride in the summer, and your goal should be to minimize your time in it.
Your proposal has you riding right down the Central Valley from Stockton to Modesto. This just prolongs your time in an area you'd rather escape as soon as possible.
The Sacramento River and the American River come from the Sierra, meet in Sacramento, cross the rest of the Central Valley and end up in the San Francisco Bay. I advise as much as possible following the rivers to the Sierra Foothills (say, to Folsom) and then riding along the foothills to Oakhurst. That will be hillier, but it will be so much better.
So I suggest riding to Sacramento, either via Petaluma and then along the Highway 80 corridor, or ride to San Francisco over the Golden Gate Bridge and take a ferry to Vallejo, or ride to San Francisco over the GG Bridge and take a ferry to Jack London Square in Oakland, ride through Walnut Creek and Rio Vista. (Check Google Maps.)
From Sacramento, take the American River bike trail to Folsom, then head up to Placerville. Then head south on Highway 49. I don't love Highway 49, but it's a lot better than riding for days in the Central Valley.