All in all, Spain is generally a bit cheaper to visit when choosing an Italy or Spain vacation. Restaurants and hotels are mainly more affordable, even in larger Spanish cities like Madrid, Barcelona, and Seville. Note that you will use euros as currency in both Italy and Spain.
Spain is overall a safe country. The most common crimes tend to be nonviolent and center around pickpockets, tourism scams, and vandalism. As anywhere, if you use common sense and are aware of your surroundings, you shouldn't run into many problems.
Yes, Barcelona and Madrid is safe for tourism, but tourists can be easy prey for pickpockets. There is little violent crime and few unsafe areas but compared to barcelona, Madrid is safe destination but it is also huge city! Both are very beautiful cities in Spain.
All in all, Spain is generally a bit cheaper to visit when choosing an Italy or Spain vacation. Restaurants and hotels are mainly more affordable, even in larger Spanish cities like Madrid, Barcelona, and Seville. Note that you will use euros as currency in both Italy and Spain.
Since Spain has a number of different climatic conditions, when you go will certainly influence the kind of holiday you have. Typically speaking, Spring (March to May) or Fall (September to November) are considered to be the best times to visit Spain.
If you prefer a more authentic and real city, Madrid is the better choice for you. For quick itineraries where you'll be visiting southern Spain, not only is Madrid better connected via train but is also less daunting since you can experience the city and its sights in one to two days.