In answering your question, I assume that you are referring to the Holy Roman Empire when you ask about the weaknesses of the German Empire. The fundamental weakness of the Empire was its decentralized structure, which permitted the existence of literally hundreds of local governments within the borders of the Empire. These states, which included secular and ecclesiastical principalities, city-states, duchies, and kingdoms, all had political rights that they jealously guarded to preserve their autonomy. German emperors of the Middle Ages had attempted to centralize the Imperial government, but they met with powerful opposition from the German states and from the popes, who resisted Imperial efforts to increase its control over northern Italy.
The popes also weakened the German emperors during the “Investiture Controversy,” during which the emperors argued that the Empire had the right to control the Catholic Church within its borders. The Papacy insisted it alone had the power to select the clergy and bishops who served in the Holy Roman Empire (and who also governed as ecclesiastical princes in their own right), enforcing its opinion by excommunicating, or expelling from the Church, those emperors who disagreed. Excommunication was politically dangerous for the Emperor because it destroyed his legitimacy as ruler and invited the other princes to revolt against him. The quarrels with the Papacy and the other princes prevented the Emperors from centralizing their authority, a situation that persisted until the disappearance of the Empire in 1806.
Spain’s weaknesses were generally of a different character, though one problem has similarities with those faced by the Holy Roman Empire. Because Spain had come into being as a sort of union of smaller states, these regions often retained many of their old rights and privileges, such as freedom from taxation from the new central government. At the height of the Spanish Empire in Europe during the 16th century, it was a peculiarity of the imperial system that the monarch could directly tax only one region of the empire – the kingdom of Castile. Attempting to tax the other regions would threaten to ignite rebellion, so for a long period the Spanish Empire was dependent on just one relatively small region to sustain its rule over the other parts of the empire.
Spain’s conquest of the Aztec and Incan civilizations of the New World brought enormous wealth to the empire, but it also created another problem in the long run. The flood of gold and silver into Spain generated a ruinous inflation that economically undermined the Spanish peasantry and prevented the development of new industries. Spain’s inability to develop a more modern, capitalist-based economy led to prolonged depression when the flow of gold and silver from the New World inevitably ran out.
Another weakness that affected Spain was the physical decline of the Habsburg dynasty that ruled it. Generations of inbreeding ultimately led to the throne being gained by Charles II, who was both insane and impotent. After his death, the War of the Spanish Succession (1701-1714) broke out, at the conclusion of which the empire was partitioned between various European powers.