Lift is proportional to the surface area of the wing, a two-dimensional measure. Mass is proportional to the volume of the animal, a three-dimensional measure. So as the linear dimension of an animal increases, the rate of increase of the mass is proportional to the 3/2 power of the rate of increase of the wing area. This means the wings must be proportionally larger for a larger animal. Compare a hummingbird's wings, which are smaller than its body, to a macaw's wings, which eclipse its body when unfurled, to a condor's wings, which comprise most of its silhouette in flight.
For a 300-lb ostrich to fly it would need something like a hundred-foot wingspan. And the breastbone necessary to anchor those muscles would be too large and awkward for it to survive, even if it evolved a clever way to fold up its wings when on the ground.
So yes, there is a maximum size for any animal when you're calculating its power of flight. IIRC the largest bird that can barely fly at all weighs around forty pounds.