Usually, when we say "affine transformation", we mean an invertible one. Either way, any affine transformation is indeed of the form $x \mapsto Ax + b$, where $A$ is a (invertible) linear transformation and $b$ is a fixed vector.
If by "scaling", you mean a scalar multiple of the identity matrix and by a shear, you mean an upper triangular matrix with 1's along the diagonal, then rotations, scalings, shears, and translations do not generate all possible affine transformations, because rotations, scalings, and shears do not generate all possible linear transformations.
On the other hand, any linear transformation can always be written as $A = RDS$, where $R$ and $S$ are orthogonal transformations (i.e., rotations) and $D$ is diagonal. The action of a diagonal matrix can be viewed as rescaling by different factors in different amounts in each co-ordinate direction. So compositions of translations, rotations, and co-ordinate scalings generate all affine transformations.
Any linear transformation can also be written as $A = RDU$, where $R$ is orthogonal, $D$ is diagonal, and $U$ is upper triangular with all $1$'s along the diagonal. In this sense any invertible affine transformation can be written as a composition of a translation, a rotation, co-ordinate scalings, and a composition of shears.