Two quick concepts, there is a redline at which the engine may self-destruct, and there is a functional limit at which something limits the ability to go faster - that could be heads, exhaust, valve float, etc.
The first constraint is a function of the strength of the components, having forged rods, forged pistons, a strong crank, and having everything balanced down to a tiny fraction of a gram will allow an engine to spin to very high RPMs. Also the length of the stroke determines the piston speed for a given RPM. The longer your stroke the faster the piston will be moving at a given RPM and the more likely your engine will self destruct - all else equal. So a 289 in theory can *safely* spin about 250 to 350 RPM faster than a 302, which in turn can spin a bit faster than a stroker - again if all the parts and assembly are of the *same* quality/strength across the engines in question. Meaning a very strong stroker can safely spin much faster than a engine built to stock specs, but less than a 289 built to the same level of quality as the stroker.
For the second constraint, doing things like roller rockers, good porting, good manifolds or headers (intake and exhaust), correctly sized carb, etc. will increase the realized RPM.
One final note, many engines will spin up to a level were they aren't actually making any more significant power they're just spinning faster (i.e., the loss of torque is offsetting the increase in RPM at the margin - horsepower is just torque times rpm divided by a constant). In this case you would get a faster result by shifting once the power starts to level out rather than trying to wrap out the RPMs.
Without knowing what is in the bottom end, your engine's self-destruct redline could be anywhere from ~5,000 to ~7,000.
John Harvey