I learned that when an isolated system is not in equilibrium, its
thermodynamic variables such as Entropy are undefined. I also learned that when an isolated system is in equilibrium, its Entropy is maximized. However, both statements together don't make sense.
You have received some excellent answers. This answer is only offered for a somewhat different perspective.
It seems your question boils down to the following: Is it possible for an isolated system to be initially in equilibrium but where the entropy of the system is not maximized.
In order to answer this question and reconcile the two statements you presented, perhaps instead of asking whether or not an isolated system is in equilibrium, we should be asking whether or not the potential for disequilibrium exists in an isolated system due to some constraint in the system. If the potential for disequilibrium exists, and it is possible to realize that potential, the initial entropy of the system is not maximized. This is somewhat in line with @GeorgioP answer when it referred to "equilibrium state spontaneously reached when constraints are relaxed".
Consider a rigid thermally insulated vessel with no openings. The vessel is initially divided in half by a rigid thermally insulated barrier with no openings. Each half of the vessel contains a gas at different constant pressure and temperature. Consider the system to be the contents of the vessel (making it an isolated system) comprised of two sub systems initially isolated from one another, each internally in equilibrium.
Since the temperature, pressure and volume of each sub system is constant (not changing in time), each sub systems is internally in equilibrium. Thus the entropy of each subsystem is defined. The total entropy of the system is then defined as the sum of the entropies of the subsystems.
Question: Is the above described system in equilibrium?
On the one hand, if we define equilibrium as the condition where the thermodynamic variables of the system are not changing in time, our system would be considered in equilibrium.
On the other hand, if we define equilibrium as the condition where the thermodynamic variables (temperature and pressure) are the same throughout the system, our system would not be considered in equilibrium.
We do know, however, that if an opening were created in the internal constraint (barrier) by some means internal to the isolated system disequilibrium would exist resulting in an irreversible expansion of the higher pressure gas into the lower pressure gas generating entropy. Once equilibrium is reestablished, entropy would be maximized. In short, we know that a realizable potential for disequilibrium theoretically exists.
Hope this helps.