Which factors determine the keto:enol ratio for aldehydes, ketones, and 1,3-dicarbonyl compounds?
Your reasoning is along the right lines, but it is incomplete.

enol of B is more stable because of more substituted alkene.

The methyl group in acetone does stabilize the carbon-carbon double bond in the enol form for the reasons you suggest. However, the methyl group also stabilizes the carbonyl double bond in the keto form (see here for example, this is why a carbonyl in a ketone is slightly stronger than a carbonyl in an aldehyde). In fact, in simple carbonyl compounds, the methyl group stabilizes the carbonyl double bond a bit more than it stabilizes the enolic carbon-carbon double bond. As a result, simple aldehydes generally have a higher enol content than simple ketones. Hence, the enol content in acetaldehyde is greater than the enol content in acetone.
$$\ce{carbonyl &lt;=&gt; enol}$$
$$K_\mathrm{eq}=\frac{[\text{enol}]}{[\text{carbonyl}]}$$
$$
\begin{array}{lc}
\hline
\text{compound} &amp; K_\mathrm{eq} \\
\hline
\text{acetaldehyde} &amp; 6 \times 10^{-7} \\
\text{acetone} &amp; 5 \times 10^{-9} \\
\hline
\end{array}
$$
The two β-dicarbonyl compounds have a higher enol content than the two monocarbonyl compound because hydrogen bonding and conjugation stabilize their enols. The enol content in C (a mono aldehyde) is higher than D because of the reasons outlined above.
Therefore, the overall order of increasing enol content is C &gt; D &gt;&gt; A &gt; B.
Unless you've studied this before, you might not know that a &quot;methyl group stabilizes the carbonyl double bond a bit more than it stabilizes the enolic carbon-carbon double bond&quot;. So, a general rule that might come in handy in these situations is that the enol content increases with the acidity of the enolic hydrogen. A more acidic α-hydrogen implies a weaker $\ce{C-H}$ bond. Since the position of a keto-enol equilibrium is dependent on the relative stabilities of the keto and enol forms (the compound with the highest bond strengths overall will be more stable and will predominate at equilibrium) a weak $\ce{C-H}$ (lower $\mathrm{p}K_\text{a})$ generally implies a higher enol content.
$$
\begin{array}{lr}
\hline
\text{compound} &amp; \mathrm{p}K_\text{a} \\
\hline
\text{acetone} &amp; 19.3 \\
\text{acetaldehyde} &amp; 16.7 \\
\text{2,4-pentanedione} &amp; 13.3 \\
\hline
\end{array}
$$
Finally, this earlier answer provides a review of the key factors controlling keto-enol equilibria.