Yes, you can join a soccer team in Madrid even if you are not a permanent resident. Many groups accept foreign players. However, you must check the specific requirements of the team you wish to join.