Post 1700 doesn't exactly equal loss of America. But wanking Spain after 1700 can be possible.
Assuming post 1700 but before the loss of the Americas for the most part:
- Luis I does not die 8 and a half months into his reign (after Felipe V abdicated).
- Fernando VI sires an heir (his wife, Bárbara of Portugal had a stillborn son in 1733).
- Philip, Duke of Calabria is not born mentally retarded, becomes King of Spain in lieu of Carlos III.
- Keep Godoy away from any form of power.
- Have one of Carlos IV's sons born before Fernando VII survive (literally four to choose from, and all of them sans one is named Carlos)
Assuming after the loss of America as per the OP:
- Somehow change Isabel's personality (easier said than done considering she didn't have a strong figure in her life.
- Glorious Revolution Succeeds, with any number of viable men to choose as Kings (Leopold of Hohenzollern, Ferdinand of Saxe-Coburg-Gotha (re: Fernando II of Portugal), Amedeo of Savoy)
- Speaking of Amedeo of Savoy, somehow manage to not get strung by a series of unfortunate events.
Granted none of the above will guarantee a wanked Spain, after all Spain will need a lot of work to either remain a great power (in the 18th and early 19th centuries) or become one (by the 1860's)