The first scenario represents diminishing marginal returns (in this case, diminishing marginal product of labor), while the second scenario represents increasing variable cost (for a given set of fixed costs), which results from increasing marginal cost, which in turn results from diminishing marginal returns.
The Law of Diminishing Marginal Returns states that in all production processes, if more and more of one input is added keeping all other inputs fixed, the marginal product of that input will start to decrease eventually, a result of decreasing productivity. Diminishing returns occur when only one input is increased, keeping all the other inputs fixed. Hence, it is a short-run phenomenon. The reason for diminishing returns to exist is that over-employment of one input with other inputs fixed will eventually lead to fewer of the fixed inputs available per unit of the variable input. This will at some point lead to a fall in the productivity of the variable input.
As productivity decreases (less additional output for each additional input), the average cost per unit increases. This stage is characterized by the upward sloping portion of the average (variable and total) cost curves.
Specialization does not explain either of the above two scenarios. Specialization occurs when workers develop a particular skill set because of performing a particular work duty over a period of time. Instead of leading to diminishing return or diseconomies of scale, specialization instead is likely to result in an increase in returns with increasing input or output.